Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
flake8
-
How I start every new Python backend API project
repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: trailing-whitespace - id: check-merge-conflict - id: check-yaml args: [--unsafe] - id: check-json - id: detect-private-key - id: end-of-file-fixer - repo: https://github.com/timothycrosley/isort rev: 5.10.1 hooks: - id: isort - repo: https://github.com/psf/black rev: 22.8.0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 rev: 3.9.2 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.971 hooks: - id: mypy args: [ --warn-unused-configs, --ignore-missing-imports, --disallow-untyped-defs, --follow-imports=silent, --install-types, --non-interactive ]
-
Flake8 took down the gitlab repository in favor of github
I just ran `pre-commit autoupdate`. It's asking for a username for https://gitlab.com/pycqa/flake8. :-(
-
flake8-length: Flake8 plugin for a smart line length validation.
Flake8 plugin for a smart line length validation.
-
Should I follow the warnings in Pycharm? Does anyone do this?
repo: https://gitlab.com/pycqa/flake8 rev: 3.9.2 hooks:
-
flake8-pylint: Flake8 plugin that runs PyLint
Flake8 plugin that runs PyLint.
- Ask HN: Did somebody have success with the migration of Python 2.7 to Java/C#?
-
Make your Django project newbie contributor friendly with pre-commit
$ pre-commit install pre-commit installed at .git/hooks/pre-commit $ git add .pre-commit-config.yaml $ git commit -m "Add pre-commit config" [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://gitlab.com/pycqa/flake8. [INFO] Initializing environment for https://github.com/pycqa/isort. [INFO] Initializing environment for https://github.com/python/black. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitlab.com/pycqa/flake8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pycqa/isort. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/python/black. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Trim Trailing Whitespace.................................................Passed Check Yaml...............................................................Passed Check for merge conflicts................................................Passed Debug Statements (Python)............................(no files to check)Skipped Check for added large files..............................................Passed Fix requirements.txt.................................(no files to check)Skipped Check django project for potential problems..........(no files to check)Skipped Check django project for missing migrations..........(no files to check)Skipped flake8...............................................(no files to check)Skipped isort................................................(no files to check)Skipped black................................................(no files to check)Skipped
-
On unit testing
If you're looking for just good automated error checking, I personally use a bunch of flake8 plugins via pre-commit hooks: flake8-bugbear, flake8-builtins, flake8-bandit, etc. You can find a bunch of sites that give recommended plugins and you just need to pick which ones you care about :)
-
Python: Setting Up Project Environment
flake8 is Python style checker based on PEP8(Python Enhance Proposal 8). black is a good code formatter. But some items such as Documentation String, black is not provided the check option. flake8 not only helps for lack of black but also can be easily applied with black.
Pylint
-
W1203: logging-fstring-interpolation (Solved)
A little introduction about pylint. Pylint is a static code analyzer, it analyses your code without actually running it. Pylint looks for potential errors, gives suggestions on coding standards that your code is not adhering to, potential places where refactoring might help, and also warnings about smelly code.
-
Enhancing Python Code Quality: A Comprehensive Guide to Linting with Ruff
Pylint, on the other hand, focuses on code analysis and style checking. It offers extensive customization options and supports various coding standards. Pylint is known for its comprehensive reports and ability to detect a wide range of code issues.
-
Options for configuration of python libraries - Stack Overflow
In my opinion, the best way to expose configuration options is to read and parse them from the project's pyproject.toml file. Here's how Pylint handles it.
-
Pylint strict base configuration
I even contributed to Pylint by submitting a new rule a few years ago : implicit-str-concat.
-
Premier League Project Infrastructure Update
Implemented code formatting with Black and linting with Pylint in my CI pipeline. Here is my updated GitHub Actions Workflow file: ci.yml
-
Improve your Django Code with pre-commit
One last thing to do before running the hooks is to create a config file, just like we did with flake8. For this you are going to create a pylintrc file at the roor of your project and copy the contents of the pylintrc file from the pylint repo (here is the link to it).
- Even the Pylint codebase uses Ruff
What are some alternatives?
pyright - Static Type Checker for Python
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.
black - The uncompromising Python code formatter [Moved to: https://github.com/psf/black]
pylama - Code audit tool for python.
yapf - A formatter for Python files
black - The uncompromising Python code formatter
pyre-check - Performant type-checking for python.
prospector - Inspects Python source files and provides information about type and location of classes, methods etc
mypy - Optional static typing for Python
autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide.
pre-commit - A framework for managing and maintaining multi-language pre-commit hooks.
ruff - An extremely fast Python linter and code formatter, written in Rust.