HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pylint — A Python code linter. More information: <https://pylint.pycqa.org/en/latest/>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandpythonclicodeinformationpylintmorelinter

Problem

How to use the pylint command: A Python code linter. More information: <https://pylint.pycqa.org/en/latest/>.

Solution

pylint — A Python code linter. More information: <https://pylint.pycqa.org/en/latest/>.

Show lint errors in a file:
pylint {{path/to/file.py}}


Lint a package or module (must be importable; no .py suffix):
pylint {{package_or_module}}


Lint a package from a directory path (must contain an __init__.py file):
pylint {{path/to/directory}}


Lint a file and use a configuration file (usually named pylintrc):
pylint --rcfile {{path/to/pylintrc}} {{path/to/file.py}}


Lint a file and disable a specific error code:
pylint --disable {{C,W,no-error,design}} {{path/to/file}}

Code Snippets

Show lint errors in a file

pylint {{path/to/file.py}}

Lint a package or module (must be importable; no `.py` suffix)

pylint {{package_or_module}}

Lint a package from a directory path (must contain an `__init__.py` file)

pylint {{path/to/directory}}

Lint a file and use a configuration file (usually named `pylintrc`)

pylint --rcfile {{path/to/pylintrc}} {{path/to/file.py}}

Lint a file and disable a specific error code

pylint --disable {{C,W,no-error,design}} {{path/to/file}}

Context

tldr-pages: common/pylint

Revisions (0)

No revisions yet.