ó bIŸSc@sËdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z d„Z deefd „ƒYZ d e fd „ƒYZd e fd „ƒYZd„ZdZdS(sutilities methods and classes for checkers Base id of standard checkers (used in msg and report ids): 01: base 02: classes 03: format 04: import 05: misc 06: variables 07: exceptions 08: similar 09: design_analysis 10: newstyle 11: typecheck 12: logging 13: string_format 14: string_constant 15-50: not yet used: reserved for future internal checkers. 51-99: perhaps used: reserved for external checkers The raw_metrics checker has no number associated since it doesn't emit any messages nor reports. XXX not true, emit a 07 report ! iÿÿÿÿN(t ASTWalker(tOptionsProviderMixIn(t diff_string(tregister_pluginsc Cs³g}x¦|D]ž}||}t}t|tƒr>d„}n|j|ƒ}|dk rwt||ƒ}||ƒ}n d\}}||jddƒ||ƒ||f7}q W|S(sžget values listed in from and , and return a formated list of values, designed to be given to a ureport.Table object cSsd|S(Ns%.3f((tnum((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyt=stNCt_t N(RR(tstrt isinstancetfloattgettNoneRtreplace( tstatst old_statstcolumnstlinestm_typetnewtformattoldtdiff_str((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyttable_lines_from_stats3s     ,t BaseCheckercBs\eZdZdZdZdZiZdZdd„Z dddd„Z d„Z d„Z RS( sbase class for checkersicCs<tj||ƒ|jjƒ|_tj|ƒ||_dS(sochecker instances should have the linter as argument linter is an object implementing ILinter N(Rt__init__tnametlowerRtlinter(tselfR((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyRUs cCs|jj||||ƒdS(sadd a message of a given typeN(Rt add_message(Rtmsg_idtlinetnodetargs((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyR_scCsdS(s3called before visiting project (i.e set of modules)N((R((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pytopenescCsdS(s2called after visiting project (i.e set of modules)N((R((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pytclosehsN((( t__name__t __module__t__doc__R RtleveltoptionstmsgstreportsRRR$R%(((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyRHs  tBaseRawCheckercBs eZdZd„Zd„ZRS(sbase class for raw checkerscCsntjdtƒ|j}|jdƒtjdkrQ|jtj |j ƒƒn|jtj|j ƒƒdS(sŽprocess a module the module's content is accessible via the stream object stream must implement the readline method sNModules that need access to the tokens should use the ITokenChecker interface.iiN(ii( twarningstwarntDeprecationWarningt file_streamtseektsyst version_infotprocess_tokensttokenizetgenerate_tokenstreadline(RR"tstream((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pytprocess_moduleos   cCs tƒ‚dS(s"should be overridden by subclassesN(tNotImplementedError(Rttokens((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyR5€s(R&R'R(R:R5(((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyR-ls tBaseTokenCheckercBseZdZd„ZRS(sEBase class for checkers that want to have access to the token stream.cCs tƒ‚dS(s#Should be overridden by subclasses.N(R;(RR<((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyR5ˆs(R&R'R(R5(((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyR=…scCst|tdƒdS(s0initialize linter with checkers in this package iN(Rt__path__(R((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyt initializesR?(Rs initialize(R(R3R6R.t astroid.utilsRtlogilab.common.configurationRtpylint.reportersRt pylint.utilsRRRR-R=R?t__all__(((sR/Users/jacob/code/ruby/exercism-analysis/vendor/python/pylint/checkers/__init__.pyt's    $