mozlint.util package

Submodules

mozlint.util.implementation module

class mozlint.util.implementation.LintProcess(config, *args, **kwargs)

Bases: mozprocess.processhandler.ProcessHandlerMixin, abc.ABC

abstract process_line(line)

Process a single line of output.

The implementation is responsible for creating one or more :class:`~mozlint.result.Issue`s and storing them somewhere accessible.

Parameters

line (str) – The line of output to process.

run(*args, **kwargs)

Starts the process.

If timeout is not None, the process will be allowed to continue for that number of seconds before being killed. If the process is killed due to a timeout, the onTimeout handler will be called.

If outputTimeout is not None, the process will be allowed to continue for that number of seconds without producing any output before being killed.

mozlint.util.pip module

mozlint.util.pip.reinstall_program(REQ_PATH)

Try to install flake8 at the target version, returns True on success otherwise prints the otuput of the pip command and returns False

mozlint.util.string module

mozlint.util.string.pluralize(s, num)

Module contents