Linters composer
Project description
🔫 pystolint 🔫
Yet another python linter?
No. It's just a runner for ruff + mypy with these settings
Why?
I'm fed up with:
- Having to copy settings for every single project. (at least until "parent pyproject.toml" is not invented)
- Not being able to apply checks only to git diffs, which makes it hard to add linters to large projects
- Not being able to deprecate certain things and preventing them in new code.
Install
Simple:
pip install pystolint
or
pip install git+ssh://git@github.com/hhru/pystolint.git@master
Dev:
- Clone repo
git clone git@github.com:hhru/pystolint.git ~/projects/pystolint
cd ~/projects/pystolint
python -m venv .venv
source .venv/bin/activate
pip install -e .
- Create global shortcut (/usr/local/bin/pys):
#!/path/to/your/pystolint/.venv/bin/python
import sys
from pystolint.main import main
if __name__ == '__main__':
sys.exit(main())
- Make executable:
chmod +x /usr/local/bin/pys
Usage
Check code:
pys check .
pys check path1 path2
pys check --diff
Format code:
pys format .
pys format path1 path2
Settings
Can be specified from cli or pyproject.toml. Cli settings have bigger priority
example toml:
[tool.pystolint]
base_toml_path = "/path/to/shared/config.toml"
base_branch_name = "develop"
cli:
--base_toml_path- path or link for replace pystolint default settings--base_branch_name- branch name from which to get diff (default is master)--config- specify path to local toml configs (default ispyproject.tomlin current dir)
Project details
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
pystolint-0.4.0.tar.gz
(26.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pystolint-0.4.0-py3-none-any.whl
(23.7 kB
view details)
File details
Details for the file pystolint-0.4.0.tar.gz.
File metadata
- Download URL: pystolint-0.4.0.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e7229f86cf7435cfba81b0c5e83b6dc7e598ea2d212d9e5f2b7a7155cce1e66
|
|
| MD5 |
9b42c0a54b2559fb2ae811570ee52ff8
|
|
| BLAKE2b-256 |
f569d3b8625ce33c899eb7213b149bbe9ddb0697d3a16523343a6be06b2b1cf3
|
File details
Details for the file pystolint-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pystolint-0.4.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c69b7bf64bf6337450a78cbbe886d28127253f86fffaf43239ffd1679f1fa9bb
|
|
| MD5 |
08cc4c8782cf3bca970e79d4dfe497e3
|
|
| BLAKE2b-256 |
0b07e852d1034c9e149d9ff7dd1bcd1510ec53e7a0f25c6abb9741d94bc08bc9
|