Python Linter

Open-source Python projects categorized as Linter | Edit details

Top 23 Python Linter Projects

  • mypy

    Optional static typing for Python

    Project mention: apischema v0.17 - I've developed the fastest typed JSON (de)serialization library, and you can also build your GraphQL schema with it | reddit.com/r/Python | 2022-01-18

    Personally, I rely on static typing, and it rarely deceived me. I'm very impatient concerning https://github.com/python/mypy/issues/9773, which will allow finally to fully type apischema functions. Trends are evolving, TypeScript adoption is a good example.

  • pre-commit

    A framework for managing and maintaining multi-language pre-commit hooks.

    Project mention: gRPC proto files Best Practices | dev.to | 2022-01-21

    You can also enforce protolint to execute automatically before committing code using pre-commit. Install pre-commit, add a file .pre-commit-config.yaml, and add this content to it:

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • isort

    A Python utility / library to sort imports.

    Project mention: Saturday Daily Thread: Resource Request and Sharing! Daily Thread | reddit.com/r/Python | 2022-01-22

    I discovered isort which sorts the python imports... https://pycqa.github.io/isort/

  • proselint

    A linter for prose.

    Project mention: Grammar checker for scientific writing | reddit.com/r/emacs | 2021-12-17

    Yep, though there's not a lot to see! Follow the instructions for installing proselint at https://github.com/amperser/proselint and configure as follows:

  • bandit

    Bandit is a tool designed to find common security issues in Python code.

    Project mention: Modern Python setup for quality development | dev.to | 2022-01-07

    bandit: Bandit is a tool designed to find common security issues in Python code.

  • Pylint

    It's not just a linter that annoys you!

    Project mention: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch) | news.ycombinator.com | 2022-01-07

    The PR has been merged (for lists and tuples and sets only).

    https://github.com/PyCQA/pylint/pull/1655

  • pytype

    A static type analyzer for Python code

    Project mention: mypy alternatives - pytype and pyright | libhunt.com/r/mypy | 2021-10-30

    another library to check typing in python code (by google)

  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • pre-commit-hooks

    Some out-of-the-box hooks for pre-commit

    Project mention: Git Pre-commit Hooks for Automatic Python Code Formatting | dev.to | 2022-01-03

    repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.0.1 hooks: - id: requirements-txt-fixer

  • yamllint

    A linter for YAML files.

    Project mention: Modern Python setup for quality development | dev.to | 2022-01-07

    repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.0.1 hooks: - id: check-added-large-files - id: check-ast - id: check-builtin-literals - id: check-case-conflict - id: check-docstring-first - id: check-executables-have-shebangs - id: check-json - id: check-merge-conflict - id: check-symlinks - id: check-toml - id: check-vcs-permalinks - id: check-xml - id: check-yaml args: [--allow-multiple-documents] - id: debug-statements - id: detect-aws-credentials args: [--allow-missing-credentials] - id: destroyed-symlinks - id: end-of-file-fixer - id: fix-byte-order-marker - id: fix-encoding-pragma args: [--remove] - id: forbid-new-submodules - id: mixed-line-ending args: [--fix=auto] - id: name-tests-test args: [--django] - id: requirements-txt-fixer - id: trailing-whitespace - repo: local hooks: - id: black name: black entry: poetry run black language: system types: [python] - id: flake8 name: flake8 entry: poetry run flake8 language: system types: [python] - repo: https://github.com/pycqa/isort rev: "5.9.1" hooks: - id: isort args: - --profile - black - --filter-files - repo: https://github.com/adrienverge/yamllint.git rev: v1.26.1 hooks: - id: yamllint args: [-c=.yamllint.yaml] - repo: https://gitlab.com/devopshq/gitlab-ci-linter rev: v1.0.2 hooks: - id: gitlab-ci-linter args: - "--server" - "https://your.gitlab.server" # Need env var GITLAB_PRIVATE_TOKEN with gitlab api read token - repo: https://github.com/commitizen-tools/commitizen rev: v2.17.11 hooks: - id: commitizen stages: [commit-msg] - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: 2.1.5 # or specific git tag hooks: - id: forbid-binary - id: shellcheck - id: shfmt

  • cfn-python-lint

    CloudFormation Linter

    Project mention: Static Analysis for Cloud Formation | dev.to | 2021-12-29

    cfn-lint: Verify that the template is correct.

  • Flake8

    flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.

    Project mention: Modern Python setup for quality development | dev.to | 2022-01-07

    flake8: Flake8 is a wrapper around these tools: PyFlakes pycodestyle Ned Batchelder's McCabe script

  • wemake-python-styleguide

    The strictest and most opinionated python linter ever!

    Project mention: flake8-cached - a wrapper around flake8 to cache file runs | reddit.com/r/Python | 2021-05-20

    I use flake8 with [wemake-python-style-guide](https://wemake-python-stylegui.de/) plugin. It takes around 2mins to run the linter for some mid-range web apps. I have created https://github.com/jnoortheen/flake8-cached to speed up this process. I use it with Pycharm's filewatcher. It is a simple wrapper and intended to be used only during development with a fs watcher.

  • prospector

    Inspects Python source files and provides information about type and location of classes, methods etc

  • pyupgrade

    A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.

    Project mention: pathlib instead of os. f-strings instead of .format. Are there other recent versions of older Python libraries we should consider? | reddit.com/r/Python | 2021-12-18

    Also pyupgrade to generally upgrade your code to whatever python version pyupgrade supports :)

  • pyflakes

    A simple program which checks Python source files for errors

    Project mention: I have made spongebob-cli, watch classic spongebob from your terminal! ☂️ | reddit.com/r/Python | 2022-01-23
  • cpplint

    Static code checker for C++

    Project mention: C/C++ pre-commit hooks for static analyzers and linters | reddit.com/r/cpp | 2021-09-13

    and five C/C++ static code analyzers: * clang-tidy * oclint * cppcheck * cpplint (recently added!) * include-what-you-use (recently added!)

  • pylama

    Code audit tool for python.

    Project mention: Newbie here: blank spaces for better code readability? | reddit.com/r/learnpython | 2022-01-11

    Use a linter like pylama

  • pydocstyle

    docstring style checker

    Project mention: What do you think about this method docstring style? | reddit.com/r/Python | 2022-01-09

    Check out https://github.com/pycqa/pydocstyle. There's a flake8 extension for it too https://pypi.org/project/flake8-docstrings/

  • flake8-bugbear

    A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.

  • PEP 8 Speaks

    A GitHub :octocat: app to automatically review Python code style over Pull Requests

  • autoflake

    Removes unused imports and unused variables as reported by pyflakes

    Project mention: Python Code Quality - Improve the quality of your Python code with linters, code formatters, and security vulnerability scanners | reddit.com/r/Python | 2021-11-07

    yaml repos: - repo: https://github.com/myint/autoflake rev: v1.4 hooks: - id: autoflake args: - --in-place - --remove-all-unused-imports - --expand-star-imports - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/asottile/pyupgrade rev: v2.29.0 hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/PyCQA/isort rev: 5.9.3 hooks: - id: isort - repo: https://github.com/psf/black rev: 21.10b0 hooks: - id: black args: [--safe, --quiet] - repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: - id: flake8 - repo: local hooks: - id: pylint name: pylint entry: pylint language: system types: [python] args: [ "-rn", "-sn", ] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.910-1 hooks: - id: mypy name: mypy entry: mypy language: python types: [python] args: [] require_serial: true - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.4.1 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88]

  • flynt

    A tool to automatically convert old string literal formatting to f-strings

    Project mention: pathlib instead of os. f-strings instead of .format. Are there other recent versions of older Python libraries we should consider? | reddit.com/r/Python | 2021-12-18
  • megalinter

    🦙 Mega-Linter analyzes 48 languages, 22 formats, 19 tooling formats, abusive copy-pastes and spelling mistakes in your repository sources with a GitHub Action, other CI tools or locally.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-01-23.

Python Linter related posts

Index

What are some of the best open-source Linter projects in Python? This list will help you:

Project Stars
1 mypy 12,161
2 pre-commit 7,245
3 isort 4,442
4 proselint 3,865
5 bandit 3,810
6 Pylint 3,768
7 pytype 3,582
8 pre-commit-hooks 2,676
9 yamllint 1,793
10 cfn-python-lint 1,791
11 Flake8 1,738
12 wemake-python-styleguide 1,738
13 prospector 1,566
14 pyupgrade 1,356
15 pyflakes 1,098
16 cpplint 949
17 pylama 849
18 pydocstyle 839
19 flake8-bugbear 670
20 PEP 8 Speaks 561
21 autoflake 470
22 flynt 458
23 megalinter 436
Find remote jobs at our new job board 99remotejobs.com. There are 29 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Less time debugging, more time building
Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
scoutapm.com