Creation and maintenance of `exclude` file lists for common code quality tools.
Project description
debtcloset
Gradually roll out ruff and/or pyright to your Python codebase with minimal disruption. debtcloset helps you adopt code quality tooling without overwhelming your team or missing deadlines.
Here's how you can up-level your repo's code quality using debtcloset:
- Start using a
pyproject.tomlfile for your project if you don't already. pip install(oruv addetc) debtcloset plus ruff and/or pyright.- Configure ruff and/or pyright in your
pyproject.toml. If you have no idea where to start, consider just copy-pasting these configs: - Use
debtclosetto update your configs to ignore errors for all files that currently fail any ruff and pyright checks:from debtcloset.ruff.toml import exclude as ruff_exclude from debtcloset.pyright.toml import exclude as pyright_exclude ruff_exclude() pyright_exclude() - Add ruff/pyright to your pre-commit hooks and/or CI workflows.
You can land all these changes with zero disruption to your team, since any pre-existing errors remain ignored until you choose to address them. The exclude lists of files that debtcloset added to your pyproject.toml show you what needs to be fixed, and you can address them at your own pace. Meanwhile, any new modules will by default be checked by ruff and pyright, preventing the introduction of new issues.
Q&A:
- Why not just fix all the errors? If you're capable of that, then just do it, don't use debtcloset!
- Should I include calls to debtcloset in my pre-commit hooks? Absolutely not. debtcloset is a one-time tool to help you get started with ruff and pyright. Once you've run it, you should remove the calls to debtcloset from your codebase. (However, it can be useful to occasionally re-run debtcloset to identify any files that have been removed or fixed but failed to get removed from the exclude lists.)
- What's the point of using ruff/pyright if you're just going to ignore all the errors? Although it's true that debcloset ignores pre-existing errors, your ruff/pyright checks will still catch new errors in any new or already error-free as they're introduced. The point is to minimize future damage. It's still on you to prioritize and burn down your exclude lists over time.
We're on pypi. Consider using the simplest-possible virtual environment if working directly on this repo.
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
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
File details
Details for the file debtcloset-0.4.2.tar.gz.
File metadata
- Download URL: debtcloset-0.4.2.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e28a79fb9ce9db9063cf8dedfaa9cc76ffbc36bb03d19e0430d95b1d1bc8896
|
|
| MD5 |
1b578e32bd8fb4b8b24eb2e5c73e8b8f
|
|
| BLAKE2b-256 |
e542587ca4de988579df1be63c01595c30e6a1c15d80c8bf8d74401d3104d188
|
File details
Details for the file debtcloset-0.4.2-py3-none-any.whl.
File metadata
- Download URL: debtcloset-0.4.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b177e79d4bfd349201df1d1856e1a1f5242983de2ca4afb6e24b71cb623fc672
|
|
| MD5 |
f8d63eddaead5e12b702a52d4a353593
|
|
| BLAKE2b-256 |
661e6ddb84b970e91627e9963a7c5a93841765c86912b9837d341106862bd7e8
|