class StringConstantChecker(BaseTokenChecker, BaseRawFileChecker): (source)
Check string literals.
Method | __init__ |
Checker instances should have the linter as argument. |
Method | check |
Undocumented |
Method | check |
Adds a message for each string using inconsistent quote delimiters. |
Method | process |
Process a module. |
Method | process |
Check for bad escapes in a non-raw string. |
Method | process |
Undocumented |
Method | process |
Should be overridden by subclasses. |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Constant | ESCAPE |
Undocumented |
Constant | UNICODE |
Undocumented |
Class Variable | msgs |
Undocumented |
Class Variable | name |
Name of the provider. |
Class Variable | options |
Options provided by this provider. |
Instance Variable | string |
Token position -> (token value, next token). |
Method | _detect |
Check whether strings include a 'u' prefix like u'String'. |
Instance Variable | _unicode |
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 | 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 |
pylint.checkers.BaseChecker.__init__
Checker instances should have the linter as argument.
Sequence[ nodes.NodeNG]
, iterable_type: str
):
(source)
¶
Undocumented
Adds a message for each string using inconsistent quote delimiters. Quote delimiters are used inconsistently if " and ' are mixed in a module's shortstrings without having done so to avoid escaping an internal quote character. Args: tokens: The tokens to be checked against for consistent usage.
str
, string_body: str
, start_row: int
, string_start_col: int
):
(source)
¶
Check for bad escapes in a non-raw string. prefix: lowercase string of string prefix markers ('ur'). string_body: the un-parsed body of the string, not including the quote marks. start_row: line number in the source. string_start_col: col number of the string start in the source.
def visit_call(self, node:
nodes.Call
):
(source)
¶
Undocumented
def visit_const(self, node:
nodes.Const
):
(source)
¶
Undocumented
def visit_list(self, node:
nodes.List
):
(source)
¶
Undocumented
def visit_tuple(self, node:
nodes.Tuple
):
(source)
¶
Undocumented