codecrumbs
Codecrumbs is a Python library (and pytest plugin) for source code refactoring across library boundaries. It allows you to change the API of your library and to propagate this changes to every one who uses your library.
More can be found in the documentation.
Example
Simple example which renames one argument:
class Example:
# old code ...
# def method(self,v):
# print(v)
@renamed_argument("v", "value")
def method(self, value):
print(value)
# some where else
e = Example()
e.method(v=5)
and apply the refactoring later
# if you have a standalone script
codecrumbs example.py
# or if you have tests
pytest --codecrumbs-fix test_example.py
which will rename the argument
e.method(value=5)
You can use codecrumbs instead of python to execute your code, or pytest to run your tests and apply the renamings automatically.
This can be used to fix the small things in your library you wanted to fix but never did, because you wanted to stay backwards compatible or didn't wanted you user to fix 1000 renamings in their code.
Installation
You can install codecrumbs via pip from PyPI:
pip install codecrumbs
The pytest support comes out of the box and everyone who depends on your library can use pytest --codecrumbs-fix to apply the changes you declared.
Features
With codecrumbs you can fix:
- method / attribute names
- rename named arguments of functions
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Issues
If you encounter any problems, please file an issue along with a detailed description.
License
Distributed under the terms of the MIT license, "pytest-codecrumbs" is free and open source software
Metadata
Release files for codecrumbs 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| codecrumbs-0.1.0.tar.gz | 10.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codecrumbs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.1 kB
Release files / codecrumbs-0.1.0.tar.gz
| Download URL | codecrumbs-0.1.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5de0867d0851bf6d2bc23ebc81291e6625afe4f743da13de0cc822672d9c07d
|
|
BLAKE2b-256 checksum How to use checksums |
759863692961605d74e2d7c2e21e1bed63bbcfe50d4bb6bf733f1f9123bec790
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.0 Linux/5.10.0-20-amd64
|
Release files / codecrumbs-0.1.0-py3-none-any.whl
| Download URL | codecrumbs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b8ce3501e6a8d0618027821e3005df693951b5ee46ef5d20ef86a1b93cc5928
|
|
BLAKE2b-256 checksum How to use checksums |
19c5a1b75da5bbbcb3de4ed4534ccdbd5f8b29d45dc6979fef8ac177707bb811
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.0 Linux/5.10.0-20-amd64
|
Security for codecrumbs 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.