Fixes missing imports using Ruff and RipGrep (CLI and import)
Tested against Windows / Python 3.11 / Anaconda
pip install ruffrgimportfixer
A Python script for adding missing import statements in your Python code. The script utilizes ruff and ripgrep to identify missing imports and organizes them based on various criteria, including the number of errors, the total number of imports, and the length of the import line.
Usage:
from ruffrgimportfixer import fix_imports
fix_imports('some_pythonfile.py')
# or from the commandline ('some_pythonfile.py' as the only arg)
# or a simple bat file:
python -c "from ruffrgimportfixer import fix_imports;fix_imports(r'''%*''')"
Dependencies:
- ruff (https://github.com/astral-sh/ruff)
- ripgrep (https://github.com/BurntSushi/ripgrep)
# Both must be in sys.path
Metadata
Release files for ruffrgimportfixer 0.11
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 | Actions |
|---|---|---|---|---|
| ruffrgimportfixer-0.11.tar.gz | 5.3 kB | Without provenance | Details for ruffrgimportfixer-0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ruffrgimportfixer-0.11-py3-none-any.whl | Python 3 | none | any | Details for ruffrgimportfixer-0.11-py3-none-any.whl |
Total release size: 11.6 kB
Release files / ruffrgimportfixer-0.11.tar.gz
| Download URL | ruffrgimportfixer-0.11.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0630747225c31d2641f7709618251a3a70ac3e798edece3c1623aba4b6e896f0
|
|
BLAKE2b-256 checksum How to use checksums |
5041acf3827cd66035c148f726a5c2f63f28d53123ed09d28b9ba1d875b88f70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / ruffrgimportfixer-0.11-py3-none-any.whl
| Download URL | ruffrgimportfixer-0.11-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39f8d0024f04f2e37aad422f2d5abbf06d06eda0c1968b0fe4b2b8ca59ca4760
|
|
BLAKE2b-256 checksum How to use checksums |
2f6c2f51c1d57d69496fde519699f5113cc4c6b1ebeb223f004e7245e436d4a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for ruffrgimportfixer 0.11
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.