Skip to main content

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:

  1. Start using a pyproject.toml file for your project if you don't already.
  2. pip install (or uv add etc) debtcloset plus ruff and/or pyright.
  3. Configure ruff and/or pyright in your pyproject.toml. If you have no idea where to start, consider just copy-pasting these configs:
    1. ruff
    2. pyright
  4. Use debtcloset to 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()
    
  5. 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.

Metadata

Release files for debtcloset 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for debtcloset 0.4.2
File Size Uploaded
debtcloset-0.4.2.tar.gz 28.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for debtcloset 0.4.2
File Interpreter ABI Platform
debtcloset-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 36.1 kB

Release files / debtcloset-0.4.2.tar.gz

Download URL debtcloset-0.4.2.tar.gz
Size 28.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9e28a79fb9ce9db9063cf8dedfaa9cc76ffbc36bb03d19e0430d95b1d1bc8896
BLAKE2b-256 checksum
How to use checksums
e542587ca4de988579df1be63c01595c30e6a1c15d80c8bf8d74401d3104d188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.11

Release files / debtcloset-0.4.2-py3-none-any.whl

Download URL debtcloset-0.4.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b177e79d4bfd349201df1d1856e1a1f5242983de2ca4afb6e24b71cb623fc672
BLAKE2b-256 checksum
How to use checksums
661e6ddb84b970e91627e9963a7c5a93841765c86912b9837d341106862bd7e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.11

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page