class FormatChecker(BaseTokenChecker, BaseRawFileChecker): (source)
Formatting checker. Checks for : * unauthorized constructions * strict indentation * line length
Static Method | is |
Return True if the line length check is activated. |
Static Method | remove |
Remove the `# pylint ...` pattern from lines. |
Static Method | specific |
Split lines according to universal newlines except those in a specific sets. |
Method | __init__ |
Checker instances should have the linter as argument. |
Method | check |
Return the indent level of the string. |
Method | check |
Check that the line length is less than the authorized value. |
Method | check |
Check given lines for potential messages. |
Method | check |
Check that there is no trailing white-space. |
Method | new |
A new line has been encountered, process it if necessary. |
Method | process |
Process a module. |
Method | process |
Process tokens and search for: |
Method | visit |
Check the node line number and check it if not yet done. |
Class Variable | name |
Name of the provider. |
Class Variable | options |
Options provided by this provider. |
Method | _check |
Check that there are not unnecessary parentheses after a keyword. |
Method | _check |
Undocumented |
Method | _check |
Check for lines containing multiple statements. |
Instance Variable | _last |
Undocumented |
Instance Variable | _lines |
Undocumented |
Instance Variable | _visited |
Undocumented |
Inherited from BaseChecker
(via BaseTokenChecker
, 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 | close |
Called after visiting project (i.e set of modules). |
Method | create |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | open |
Called before visiting project (i.e. set of modules). |
Method | reduce |
Undocumented |
Class Variable | enabled |
Undocumented |
Class Variable | msgs |
Undocumented |
Class Variable | reports |
Undocumented |
Instance Variable | linter |
Undocumented |
Property | messages |
Undocumented |
Inherited from _ArgumentsProvider
(via BaseTokenChecker
, 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 |
def is_line_length_check_activated(pylint_pattern_match_object:
Match[ str]
) -> bool
:
(source)
¶
Return True if the line length check is activated.
def remove_pylint_option_from_lines(options_pattern_obj:
Match[ str]
) -> str
:
(source)
¶
Remove the `# pylint ...` pattern from lines.
pylint.checkers.BaseChecker.__init__
Checker instances should have the linter as argument.
Check given lines for potential messages. Check if lines have: - a final newline - no trailing white-space - less than a maximum number of characters
Process tokens and search for: - too long lines (i.e. longer than <max_chars>) - optionally bad construct (if given, bad_construct must be a compiled regular expression).
def visit_default(self, node:
nodes.NodeNG
):
(source)
¶
Check the node line number and check it if not yet done.
Check that there are not unnecessary parentheses after a keyword. Parens are unnecessary if there is exactly one balanced outer pair on a line and contains no commas (i.e. is not a tuple). Args: tokens: The entire list of Tokens. start: The position of the keyword in the token list.