A linter to manage your exception like a PRO!
Project description
Manage your exceptions in Python like a PRO
Currently in BETA. Inspired by this blog post.
“For those who like dinosaurs 🦖 and clean try/except ✨ blocks.”
Installation and usage
Installation
pip install tryceratops
Usage
tryceratops [filename or dir...]
You can enable experimental analyzers by running:
tryceratops --experimental [filename or dir...]
You can ignore specific violations by using: --ignore TCXXX
repeatedly:
tryceratops --ignore TC201 --ignore TC202 [filename or dir...]
You can exclude dirs by using: --exclude dir/path
repeatedly:
tryceratops --exclude tests --exclude .venv [filename or dir...]
Violations
All violations and its descriptions can be found in docs.
Pre-commit
If you wish to use pre-commit, add this:
- repo: https://github.com/guilatrova/tryceratops
rev: v0.2.3
hooks:
- id: tryceratops
Configuration
You can set up a pyproject.toml
file to set rules.
This is useful to avoid reusing the same CLI flags over and over again and helps to define the structure of your project.
Example:
[tool.tryceratops]
exclude = ["samples"]
ignore = ["TC002", "TC200", "TC300"]
experimental = true
CLI flags always overwrite the config file.
License
MIT
Credits
Thanks to God for the inspiration 🙌 ☁️ ☀️
Logo icon was made by https://www.freepik.com
The black project for insights.
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
Built Distribution
File details
Details for the file tryceratops-0.2.3.tar.gz
.
File metadata
- Download URL: tryceratops-0.2.3.tar.gz
- Upload date:
- Size: 443.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4836284760be5e5ffaf31029e0bf858e8f4542ba183208baa249a5b1cc098b9e |
|
MD5 | 432d5222e9da59b09035aca4cf95e2b8 |
|
BLAKE2b-256 | 52692d9c5071edcff6cce1cb0b94dbc52276a87869b4d6072cee2f6c84b5c11f |
File details
Details for the file tryceratops-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: tryceratops-0.2.3-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35727cc0ba171cc0433110f742abcc6979ef3bfb593e2d6b6f8c0dc3d0c830ce |
|
MD5 | 3fc09415831c4bf411bf8516acdb5a93 |
|
BLAKE2b-256 | 00209372949ecc55f272d9bfe1d52d3c5427750187ae74d0c3acd7dfcb953c53 |