module documentation
Imports checkers for Python code.
Class |
|
BaseChecker for import statements. |
Function | register |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEPRECATED |
Undocumented |
Constant | MSGS |
Undocumented |
Function | _dependencies |
Write dependencies as a dot (graphviz) file. |
Function | _get |
Return the node where [base.]<name> is imported or None if not found. |
Function | _ignore |
Undocumented |
Function | _make |
Generate a dependencies graph and add some information about it in the report's section. |
Function | _make |
Get a list of 2-uple (module, list_of_files_which_import_this_module), it will return a dictionary to represent this as a tree. |
Function | _qualified |
Split the names of the given module into subparts. |
Function | _repr |
Return a string which represents imports as a tree. |
Type Alias | _ |
Undocumented |
Undocumented
Value |
|
Undocumented
Value |
|
def _get_first_import(node:
ImportNode
, context: nodes.LocalsDictNodeNG
, name: str
, base: str|None
, level: int|None
, alias: str|None
) -> tuple[ (nodes.Import|nodes.ImportFrom)|None, str|None]
:
(source)
¶
Return the node where [base.]<name> is imported or None if not found.
def _ignore_import_failure(node:
ImportNode
, modname: str|None
, ignored_modules: Sequence[ str]
) -> bool
:
(source)
¶
Undocumented
def _make_graph(filename:
str
, dep_info: dict[ str, set[ str]]
, sect: Section
, gtype: str
):
(source)
¶
Generate a dependencies graph and add some information about it in the report's section.
Get a list of 2-uple (module, list_of_files_which_import_this_module), it will return a dictionary to represent this as a tree.
Split the names of the given module into subparts. For example, _qualified_names('pylint.checkers.ImportsChecker') returns ['pylint', 'pylint.checkers', 'pylint.checkers.ImportsChecker']