stp.pylint_stp
This file contains custom checkers for pylint.
Module Contents
Classes
This checker checks that from * import * isn't used for any modules in the stp |
Functions
|
Registers the linter for pylint. |
- class stp.pylint_stp.NoFromImportChecker(linter: pylint.lint.pylinter.PyLinter)
Bases:
pylint.checkers.BaseChecker
This checker checks that from * import * isn’t used for any modules in the stp package.
- __implements__
- DISPLAYED_MSG = "Don't use 'from ... import ...' for any modules from the stp package."
- MSG_ID = 'stp-from-import'
- MESSAGE_HELP = "'from ... import ...' shouldn't be used for importing any modules / symbols from the stp package..."
- name = 'stp-from-import'
- priority
- msgs
- visit_module(node: astroid.nodes.Module) None
Visit method for astroid.nodes.Module.
- leave_module(node: astroid.nodes.Module) None
Leave method for astroid.nodes.Module.
- visit_importfrom(node: astroid.nodes.ImportFrom) None
Visit method for astroid.nodes.ImportFrom.
- __is_testing_module() bool
Returns whether the current module is for tests. :return: True if the current module is for tests,
- stp.pylint_stp.register(linter: pylint.lint.pylinter.PyLinter)
Registers the linter for pylint.