class DeprecatedMixin(BaseChecker): (source)
Known subclasses: pylint.checkers.imports.ImportsChecker
, pylint.checkers.stdlib.StdlibChecker
A mixin implementing logic for checking deprecated symbols. A class implementing mixin must define "deprecated-method" Message.
Method | check |
Checks if the class is deprecated. |
Method | check |
Checks if call the deprecated class. |
Method | check |
Executes the checker for the given node. |
Method | check |
Checks if the module is deprecated. |
Method | deprecated |
Callback returning the deprecated arguments of method/function. |
Method | deprecated |
Callback returning the deprecated classes of module. |
Method | deprecated |
Callback returning the deprecated decorators. |
Method | deprecated |
Callback returning the deprecated methods/functions. |
Method | deprecated |
Callback returning the deprecated modules. |
Method | visit |
Called when a :class:`nodes.Call` node is visited. |
Method | visit |
Triggered when a decorator statement is seen. |
Method | visit |
Triggered when an import statement is seen. |
Method | visit |
Triggered when a from statement is seen. |
Constant | DEPRECATED |
Undocumented |
Constant | DEPRECATED |
Undocumented |
Constant | DEPRECATED |
Undocumented |
Constant | DEPRECATED |
Undocumented |
Constant | DEPRECATED |
Undocumented |
Inherited from BaseChecker
:
Method | __eq__ |
Permit to assert Checkers are equal. |
Method | __gt__ |
Sorting of checkers. |
Method | __hash__ |
Make Checker hashable. |
Method | __init__ |
Checker instances should have the linter as argument. |
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 | options |
Options provided by this provider. |
Class Variable | reports |
Undocumented |
Instance Variable | linter |
Undocumented |
Instance Variable | name |
Name of the provider. |
Property | messages |
Undocumented |
Inherited from _ArgumentsProvider
(via 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 |
nodes.NodeNG
, mod_name: str
, class_names: Iterable[ str]
):
(source)
¶
Checks if the class is deprecated.
Executes the checker for the given node. This method should be called from the checker implementing this mixin.
pylint.checkers.stdlib.StdlibChecker
Callback returning the deprecated arguments of method/function. Args: method (str): name of function/method checked for deprecated arguments Returns: collections.abc.Iterable in form: ((POSITION1, PARAM1), (POSITION2: PARAM2) ...) where * POSITIONX - position of deprecated argument PARAMX in function definition. If argument is keyword-only, POSITIONX should be None. * PARAMX - name of the deprecated argument. E.g. suppose function: .. code-block:: python def bar(arg1, arg2, arg3, arg4, arg5='spam') with deprecated arguments `arg2` and `arg4`. `deprecated_arguments` should return: .. code-block:: python ((1, 'arg2'), (3, 'arg4'))
pylint.checkers.stdlib.StdlibChecker
Callback returning the deprecated classes of module. Args: module (str): name of module checked for deprecated classes Returns: collections.abc.Container of deprecated class names.
pylint.checkers.stdlib.StdlibChecker
Callback returning the deprecated decorators. Returns: collections.abc.Container of deprecated decorator names.
pylint.checkers.stdlib.StdlibChecker
Callback returning the deprecated methods/functions. Returns: collections.abc.Container of deprecated function/method names.
pylint.checkers.imports.ImportsChecker
Callback returning the deprecated modules. Returns: collections.abc.Container of deprecated module names.
def visit_call(self, node:
nodes.Call
):
(source)
¶
pylint.checkers.stdlib.StdlibChecker
Called when a :class:`nodes.Call` node is visited.
def visit_decorators(self, node:
nodes.Decorators
):
(source)
¶
Triggered when a decorator statement is seen.
def visit_import(self, node:
nodes.Import
):
(source)
¶
pylint.checkers.imports.ImportsChecker
Triggered when an import statement is seen.
def visit_importfrom(self, node:
nodes.ImportFrom
):
(source)
¶
pylint.checkers.imports.ImportsChecker
Triggered when a from statement is seen.
Undocumented
Value |
|
Undocumented
Value |
|
Undocumented
Value |
|
Undocumented
Value |
|