Skip to main content

python code static checker

Project description

Pylint

https://github.com/PyCQA/pylint/actions/workflows/tests.yaml/badge.svg?branch=main https://coveralls.io/repos/github/PyCQA/pylint/badge.svg?branch=main Pypi Package version Documentation Status https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/badge/linting-pylint-yellowgreen pre-commit.ci status

What is Pylint?

Pylint is a static code analyser for Python 2 or 3. The latest version supports Python 3.7.2 and above.

Pylint analyses your code without actually running it. It checks for errors, enforces a coding standard, looks for code smells, and can make suggestions about how the code could be refactored. Pylint can infer actual values from your code using its internal code representation (astroid). If your code is import logging as argparse, Pylint will know that argparse.error(...) is in fact a logging call and not an argparse call.

Pylint is highly configurable and permits to write plugins in order to add your own checks (for example, for internal libraries or an internal rule). Pylint has an ecosystem of existing plugins for popular frameworks such as pylint-django or pylint-i18n.

Pylint isn’t smarter than you: it may warn you about things that you have conscientiously done or check for some things that you don’t care about. During adoption, especially in a legacy project where pylint was never enforced, it’s best to start with the --errors-only flag, then disable convention and refactor message with --disable=C,R and progressively re-evaluate and re-enable messages as your priorities evolve.

Pylint ships with three additional tools:

  • pyreverse (standalone tool that generates package and class diagrams.)

  • symilar (duplicate code finder that is also integrated in pylint)

  • epylint (Emacs and Flymake compatible Pylint)

Projects that you might want to use alongside pylint include flake8 (faster and simpler checks with very few false positives), mypy, pyright or pyre (typing checks), bandit (security oriented checks), black and isort (auto-formatting), autoflake (automated removal of unused imports or variables), pyupgrade (automated upgrade to newer python syntax) and pydocstringformatter (automated pep257).

Install

For command line use, pylint is installed with:

pip install pylint

It can also be integrated in most editors or IDEs. More information can be found in the documentation.

Contributing

We welcome all forms of contributions such as updates for documentation, new code, checking issues for duplicates or telling us that we can close them, confirming that issues still exist, creating issues because you found a bug or want a feature, etc. Everything is much appreciated!

Please follow the code of conduct and check the Contributor Guides if you want to make a code contribution.

Show your usage

You can place this badge in your README to let others know your project uses pylint.

https://img.shields.io/badge/linting-pylint-yellowgreen

Learn how to add a badge to your documentation in the the badge documentation.

License

pylint is, with a few exceptions listed below, GPLv2.

The icon files are licensed under the CC BY-SA 4.0 license:

Support

Please check the contact information.

Tidelift

Professional support for pylint is available as part of the Tidelift Subscription. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylint-3.0.0a5.tar.gz (391.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylint-3.0.0a5-py3-none-any.whl (485.1 kB view details)

Uploaded Python 3

File details

Details for the file pylint-3.0.0a5.tar.gz.

File metadata

  • Download URL: pylint-3.0.0a5.tar.gz
  • Upload date:
  • Size: 391.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pylint-3.0.0a5.tar.gz
Algorithm Hash digest
SHA256 15bc7b37f2022720765247eec24c49b93dcae6c81418adc3c36621b13d946f6d
MD5 0f7d4cf127929191709881c6a3b11c5a
BLAKE2b-256 5733365b768fac1eef78717268399338ca77ca663201b4856747d5604fa5223f

See more details on using hashes here.

File details

Details for the file pylint-3.0.0a5-py3-none-any.whl.

File metadata

  • Download URL: pylint-3.0.0a5-py3-none-any.whl
  • Upload date:
  • Size: 485.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pylint-3.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 add6bc6380143af0f7a1ab15b5b5f54a8d9d25afc99fc7e2d86fd66f6c3e1ad9
MD5 b914c056452e8e0d378ea46095cd52dd
BLAKE2b-256 a303f8f188833f76462e1c6e9456edbf336ac24d207bb89679d0a09cb9990688

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page