Skip to main content

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:

  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.

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

debtcloset-0.4.2.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

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

debtcloset-0.4.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

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

Hashes for debtcloset-0.4.2.tar.gz
Algorithm Hash digest
SHA256 9e28a79fb9ce9db9063cf8dedfaa9cc76ffbc36bb03d19e0430d95b1d1bc8896
MD5 1b578e32bd8fb4b8b24eb2e5c73e8b8f
BLAKE2b-256 e542587ca4de988579df1be63c01595c30e6a1c15d80c8bf8d74401d3104d188

See more details on using hashes here.

File details

Details for the file debtcloset-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for debtcloset-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b177e79d4bfd349201df1d1856e1a1f5242983de2ca4afb6e24b71cb623fc672
MD5 f8d63eddaead5e12b702a52d4a353593
BLAKE2b-256 661e6ddb84b970e91627e9963a7c5a93841765c86912b9837d341106862bd7e8

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