class SimilarChecker(BaseRawFileChecker, Similar): (source)
Checks for similarities and duplicated code. This computation may be memory / CPU intensive, so you should disable it if you experience some problems.
Method | __init__ |
Checker instances should have the linter as argument. |
Method | close |
Compute and display similarities on closing (i.e. end of parsing). |
Method | get |
Passthru override. |
Method | open |
Init the checkers: reset linesets and statistics information. |
Method | process |
Process a module. |
Method | reduce |
Reduces and recombines data into a format that we can report on. |
Class Variable | name |
Name of the provider. |
Class Variable | options |
Options provided by this provider. |
Class Variable | reports |
Undocumented |
Instance Variable | linesets |
Undocumented |
Inherited from BaseChecker
(via BaseRawFileChecker
):
Method | __eq__ |
Permit to assert Checkers are equal. |
Method | __gt__ |
Sorting of checkers. |
Method | __hash__ |
Make Checker hashable. |
Method | __repr__ |
Undocumented |
Method | __str__ |
This might be incomplete because multiple classes inheriting BaseChecker can have the same name. |
Method | add |
Undocumented |
Method | check |
Check the consistency of msgid. |
Method | create |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Class Variable | enabled |
Undocumented |
Class Variable | msgs |
Undocumented |
Instance Variable | linter |
Undocumented |
Property | messages |
Undocumented |
Inherited from _ArgumentsProvider
(via BaseRawFileChecker
, BaseChecker
):
Method | get |
DEPRECATED: Return the dictionary defining an option given its name. |
Method | level |
Undocumented |
Method | load |
DEPRECATED: Initialize the provider using default values. |
Method | option |
DEPRECATED: Get the config attribute corresponding to opt. |
Method | option |
DEPRECATED: Get the current value for the given option. |
Method | options |
DEPRECATED. |
Method | options |
DEPRECATED: Return an iterator on options grouped by section. |
Method | set |
DEPRECATED: Method called to set an option (registered in the options list). |
Class Variable | option |
Option groups of this provider and their descriptions. |
Property | config |
Undocumented |
Property | level |
Undocumented |
Instance Variable | _arguments |
The manager that will parse and register any options provided. |
Instance Variable | _level |
Undocumented |
Inherited from Similar
(via BaseRawFileChecker
, BaseChecker
, _ArgumentsProvider
):
Method | append |
Append a file to search for similarities. |
Method | combine |
Reduces and recombines data into a format that we can report on. |
Method | run |
Start looking for similarities and display results on stdout. |
Instance Variable | namespace |
Undocumented |
Method | _compute |
Compute similarities in appended files. |
Method | _display |
Display computed similarities on stdout. |
Method | _find |
Find similarities in the two given linesets. |
Method | _get |
Create a report from similarities. |
Method | _iter |
Iterate on similarities among all files, by making a Cartesian product. |
pylint.checkers.BaseChecker.__init__
Checker instances should have the linter as argument.
pylint.checkers.BaseChecker.close
Compute and display similarities on closing (i.e. end of parsing).
pylint.checkers.BaseChecker.open
Init the checkers: reset linesets and statistics information.
Process a module. the module's content is accessible via the stream object stream must implement the readlines method
Reduces and recombines data into a format that we can report on. The partner function of get_map_data()