Skip to main content

Linters composer

Project description

🔫 pystolint

Yet another python linter?

No. It's just runner for ruff + mypy with this 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 (WIP) or
  • pip install git+ssh://git@github.com/hhru/pystolint.git

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 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.1.0.tar.gz (22.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.1.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pystolint-0.1.0.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pystolint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 62fc7158dada29a7f495548009c60e9e8e4c461358db20a03ae9f40f6cdc6ad3
MD5 698c462b87aa7e3496af70c6e5096b5a
BLAKE2b-256 b7a99a93ddd2ea3435caf85e30941e101f6b39f096a3608463a4dd86b57066cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pystolint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pystolint-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1571046a1daa7f2a6f9559238f095c2c6f04d7b89a1400375c9508f736b9b929
MD5 71310cf750fadfa7913d285de8edde7e
BLAKE2b-256 1832f44064dc746e0829990847739a390e9e44b73cf23b20444ea8145ce7b916

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