class documentation
class NameChecker(_BasicChecker): (source)
Undocumented
Method | __init__ |
Checker instances should have the linter as argument. |
Method | leave |
Undocumented |
Method | open |
Called before visiting project (i.e. set of modules). |
Method | visit |
Check module level assigned names. |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Class Variable | msgs |
Undocumented |
Class Variable | options |
Options provided by this provider. |
Static Method | _assigns |
Check if a node is assigning a TypeAlias. |
Static Method | _assigns |
Check if a node is assigning a TypeVar. |
Method | _check |
Check for a name using the type's regexp. |
Method | _check |
Check for TypeVar lint violations. |
Method | _create |
Undocumented |
Method | _find |
Undocumented |
Method | _name |
Undocumented |
Method | _name |
Undocumented |
Method | _raise |
Undocumented |
Method | _recursive |
Check names in a possibly recursive list <arg>. |
Class Variable | _options |
Undocumented |
Instance Variable | _bad |
Undocumented |
Instance Variable | _bad |
Undocumented |
Instance Variable | _good |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _name |
Undocumented |
Inherited from _BasicChecker
:
Class Variable | name |
Name of the provider. |
Inherited from BaseChecker
(via _BasicChecker
):
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 | reduce |
Undocumented |
Class Variable | enabled |
Undocumented |
Class Variable | reports |
Undocumented |
Instance Variable | linter |
Undocumented |
Property | messages |
Undocumented |
Inherited from _ArgumentsProvider
(via _BasicChecker
, 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 |
overrides
pylint.checkers.BaseChecker.__init__
Checker instances should have the linter as argument.
@utils.only_required_for_messages( 'disallowed-name', 'invalid-name', 'typevar-name-incorrect-variance', 'typevar-double-variance', 'typevar-name-mismatch')
def visit_assignname(self, node:
def visit_assignname(self, node:
nodes.AssignName
):
(source)
¶
Check module level assigned names.
@utils.only_required_for_messages( 'disallowed-name', 'invalid-name')
def visit_classdef(self, node:
def visit_classdef(self, node:
nodes.ClassDef
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'disallowed-name', 'invalid-name')
def visit_functiondef(self, node:
def visit_functiondef(self, node:
nodes.FunctionDef
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'disallowed-name', 'invalid-name')
def visit_module(self, node:
def visit_module(self, node:
nodes.Module
):
(source)
¶
Undocumented
def _check_name(self, node_type:
str
, name: str
, node: nodes.NodeNG
, confidence: interfaces.Confidence
= interfaces.HIGH, disallowed_check_only: bool
= False):
(source)
¶
Check for a name using the type's regexp.
def _raise_name_warning(self, prevalent_group:
str|None
, node: nodes.NodeNG
, node_type: str
, name: str
, confidence: interfaces.Confidence
, warning: str
= 'invalid-name'):
(source)
¶
Undocumented