diff options
Diffstat (limited to 'doc/user_guide/run.rst')
-rw-r--r-- | doc/user_guide/run.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/user_guide/run.rst b/doc/user_guide/run.rst index 5f280a4e7..de28a4413 100644 --- a/doc/user_guide/run.rst +++ b/doc/user_guide/run.rst @@ -45,6 +45,20 @@ thanks to the ``Run()`` function in the ``pylint.lint`` module pylint_opts = ['--disable=line-too-long', 'myfile.py'] pylint.lint.Run(pylint_opts) +Another option would be to use the ``run_pylint`` function, which is the same function +called by the command line. You can either patch ``sys.argv`` or supply arguments yourself: + +.. sourcecode:: python + + import pylint + + sys.argv = ["pylint", "your_file"] + pylint.run_pylint() + + # Or: + + pylint.run_pylint(arguments=["your_file"]) + To silently run Pylint on a ``module_name.py`` module, and get its standard output and error: |