SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Python Linter Projects
-
Project mention: It is becoming difficult for me to be productive in Python | reddit.com/r/programming | 2023-02-06
It's pretty common for codebases to use CI and CD to automatically package, run tests, upload, and/or deploy projects. If you add mypy to your CI test pipeline, then no code will pass tests that violates type annotations, and therefore, you can not deploy code that violates the stated types.
-
Have you looked at commitizen? It does most of what you want 'out-of-the-box' and can be configured to do the rest. Then add pre-commit to complete the picture and tie in to hook scripts.
-
InfluxDB
Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.
-
isort
-
Add security checks (Bandit) and dependency checks (safety)
-
-
You can try proselint, which also has built-in support in null-ls. Its LaTeX support isn't perfect, but it's workable.
-
Check out https://github.com/google/pytype
-
Sonar
Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
-
Personally I do also add "end-of-file-fixer" and "trailing-whitespace" from the "https://github.com/pre-commit/pre-commit-hooks" repo. That cleans up and normalizes some files as well.
-
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: Ruff: A new, fast and correct Python checker/linter | reddit.com/r/Python | 2023-01-26Here are insights about flake8, black, and mypy and the amount of work that went into mypy seems … just massive?!
-
pyupgrade
A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
That's a decade to make a 30 second change. Add something like https://github.com/asottile/pyupgrade to your pre-commit hooks and you won't even need 25 of those seconds.
-
Project mention: IT Pro Tuesday #227 - Notification Tool, SPF/DKIM/DMARC Tutorial, YAML Linter & More | reddit.com/r/ITProTuesday | 2022-11-15
yamllint, as the name suggests, is a linter for YAML files. It checks syntax validity, as well as looking for more-complex errors like key repetition and cosmetic problems such as line length, trailing spaces, indentation etc. This one was indly recommended by yankdevil.
-
Anyway, create a venv, pip install https://github.com/wemake-services/wemake-python-styleguide and Black, format your code and check it with flake8.
-
Project mention: Managing low-code environments with AWS CloudFormation and Azure Resource Manager | dev.to | 2023-02-06
Automate testing and validation: Before deploying your templates, it's important to test and validate them to ensure that they will work as expected. Use tools like AWS CloudFormation Linter and Azure Resource Manager Template Tester to automate this process.
-
prospector
Inspects Python source files and provides information about type and location of classes, methods etc
Project mention: Prospector vs running pylint/pycodestyle/mypy/etc individually? | reddit.com/r/Python | 2022-09-25Looking into it, I'm surprised as well. They're also both PyCQA projects, albeit with different maintainers. It's also kind of odd that prospector's pre-commit config runs both prospector and flake8 -- that seems redundant.
-
Project mention: Why are python coding standards such a mess, what is everything and where do I start? | reddit.com/r/learnpython | 2022-07-21
pyflakes
-
-
Project mention: Best general packages to use for Python projects | reddit.com/r/Python | 2022-06-13
Not so much for the project but for project support I always use black for formatting. mypy to check my code. pydocstyle to check the comments.
-
Use a code linter. And potentially use black.
-
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.
flake8-bugbear for finding likely bugs and design problems in your program. flake8-bugbear - Finding likely bugs and design problems in your program.
-
sublime-phpcs
🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter and Mess Detector Support for Sublime Text
My current job is mainly Python, so there was a steep learning curve. I have done some Python previously, but mainly for writing Sublime Text plugins back in the day.
-
Having unused imports in a Python file is a prevalent issue, with a very easy solution: autoflake. Running it over your files will remove any unused imports in place.
-
-
Two developers on the same python project should also use the same version... with poetry it is straightforward to keep track of dev dependencies. Reorder python imports is an alternative for isort: https://github.com/asottile/reorder_python_imports
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Python Linter related posts
- Managing low-code environments with AWS CloudFormation and Azure Resource Manager
- Git commit hooks
- Pylint 2.16.0 released
- I've made 45 commits across 5 branches and they all contain a private API key. How do I fix this?
- Kevin Mitnick Hacked California Law in 1983
- Ruff: A new, fast and correct Python checker/linter
- How I start every new Python backend API project
-
A note from our sponsor - #<SponsorshipServiceOld:0x00007fea5924e3c0>
www.saashub.com | 9 Feb 2023
Index
What are some of the best open-source Linter projects in Python? This list will help you:
Project | Stars | |
---|---|---|
1 | mypy | 14,798 |
2 | pre-commit | 9,665 |
3 | isort | 5,593 |
4 | bandit | 4,931 |
5 | Pylint | 4,488 |
6 | proselint | 4,128 |
7 | pytype | 4,102 |
8 | pre-commit-hooks | 3,807 |
9 | Flake8 | 2,626 |
10 | pyupgrade | 2,453 |
11 | yamllint | 2,254 |
12 | wemake-python-styleguide | 2,136 |
13 | cfn-python-lint | 2,097 |
14 | prospector | 1,757 |
15 | pyflakes | 1,230 |
16 | cpplint | 1,206 |
17 | pydocstyle | 1,001 |
18 | pylama | 975 |
19 | flake8-bugbear | 909 |
20 | sublime-phpcs | 803 |
21 | autoflake | 700 |
22 | best-of-python-dev | 662 |
23 | reorder_python_imports | 604 |