Skip to main content

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:

  1. Having to copy settings for every single project. (at least until "parent pyproject.toml" is not invented)
  2. Not being able to apply checks only to git diffs, which makes it hard to add linters to large projects
  3. 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:

  1. 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 .
  1. 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())
  1. 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 is pyproject.toml in current dir)

Project details


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.2.16.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

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

pystolint-0.2.16-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file pystolint-0.2.16.tar.gz.

File metadata

  • Download URL: pystolint-0.2.16.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for pystolint-0.2.16.tar.gz
Algorithm Hash digest
SHA256 f982231aaec571060eb945cf7dc182a83dcb626082a920ca3f3625c013594b15
MD5 d7cc2a5d3a0b82e4c3242b5f1b1802d1
BLAKE2b-256 b0a7f7f00d9f3a2c49106f2276abad1fa1cc1ec6dec30000dd2e9f27142758d4

See more details on using hashes here.

File details

Details for the file pystolint-0.2.16-py3-none-any.whl.

File metadata

  • Download URL: pystolint-0.2.16-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for pystolint-0.2.16-py3-none-any.whl
Algorithm Hash digest
SHA256 34d47238374f1537ddb16260e7f93dbc45c5ea94ee1738535869d35c44ee1045
MD5 59b1ed598243a53b2086eae06637f4d5
BLAKE2b-256 9d16b7fcb152735309d8ccc52da15aee83517c971cf8261afebfd0860a04edff

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