package documentation

Pylint [options] modules_or_packages. Check that module(s) satisfy a coding standard (and more !). pylint --help Display this help message and exit. pylint --help-msg <msg-id>[,<msg-id>] Display help messages about given message identifiers and exit.

Module base_options Functions that creates the basic options for the Run and PyLinter classes.
Module caching Undocumented
Module expand_modules No module docstring; 2/5 functions documented
Module message_state_handler No module docstring; 1/1 class documented
Module parallel No module docstring; 0/1 variable, 2/3 functions documented
Module pylinter Undocumented
Module report_functions Undocumented
Module run No module docstring; 0/1 constant, 2/2 functions, 1/1 class documented
Module utils No module docstring; 1/3 function documented

From __init__.py:

Class PyLinter Lint Python modules using external checkers.
Class Run Helper class to use as main for pylint with 'run(*sys.argv[1:])'.
Exception ArgumentPreprocessingError Raised if an error occurs during argument pre-processing.
Function augmented_sys_path Augment 'sys.path' by adding non-existent entries from additional_paths.
Function check_parallel Use the given linter to lint the files with given amount of workers (jobs).
Function discover_package_path Discover package path from one its modules and source roots.
Function fix_import_path Prepare 'sys.path' for running the linter checks.
Function load_results Undocumented
Function report_messages_by_module_stats Make errors / warnings by modules report.
Function report_messages_stats Make messages type report.
Function report_total_messages_stats Make total errors / warnings report.
Function save_results Undocumented
Function _augment_sys_path Undocumented
Function _patch_sys_path Undocumented
def load_results(base: str|Path, pylint_home: str|Path = PYLINT_HOME) -> LinterStats|None: (source)

Undocumented

def save_results(results: LinterStats, base: str|Path, pylint_home: str|Path = PYLINT_HOME): (source)

Undocumented

def discover_package_path(modulepath: str, source_roots: Sequence[str]) -> str: (source)

Discover package path from one its modules and source roots.

def check_parallel(linter: PyLinter, jobs: int, files: Iterable[FileItem], extra_packages_paths: Sequence[str]|None = None): (source)

Use the given linter to lint the files with given amount of workers (jobs). This splits the work filestream-by-filestream. If you need to do work across multiple files, as in the similarity-checker, then implement the map/reduce mixin functionality.

def report_messages_by_module_stats(sect: Section, stats: LinterStats, _: LinterStats|None): (source)

Make errors / warnings by modules report.

def report_messages_stats(sect: Section, stats: LinterStats, _: LinterStats|None): (source)

Make messages type report.

def report_total_messages_stats(sect: Section, stats: LinterStats, previous_stats: LinterStats|None): (source)

Make total errors / warnings report.

def _augment_sys_path(additional_paths: Sequence[str]) -> list[str]: (source)

Undocumented

def _patch_sys_path(args: Sequence[str]) -> list[str]: (source)

Undocumented

@contextlib.contextmanager
def augmented_sys_path(additional_paths: Sequence[str]) -> Iterator[None]: (source)

Augment 'sys.path' by adding non-existent entries from additional_paths.

@contextlib.contextmanager
def fix_import_path(args: Sequence[str]) -> Iterator[None]: (source)

Prepare 'sys.path' for running the linter checks. Within this context, each of the given arguments is importable. Paths are added to 'sys.path' in corresponding order to the arguments. We avoid adding duplicate directories to sys.path. `sys.path` is reset to its original value upon exiting this context.