# 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.
```python
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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/ruffrgimportfixer",
"name": "ruffrgimportfixer",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "import,ripgrep,ruff",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/50/41/acf3827cd66035c148f726a5c2f63f28d53123ed09d28b9ba1d875b88f70/ruffrgimportfixer-0.11.tar.gz",
"platform": null,
"description": "\r\n# Fixes missing imports using Ruff and RipGrep (CLI and import)\r\n\r\n## Tested against Windows / Python 3.11 / Anaconda\r\n\r\n## pip install ruffrgimportfixer\r\n\r\nA Python script for adding missing import statements in your Python code.\r\nThe 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.\r\n\r\n```python\r\nUsage:\r\n from ruffrgimportfixer import fix_imports\r\n\tfix_imports('some_pythonfile.py')\r\n\t# or from the commandline ('some_pythonfile.py' as the only arg)\r\n\r\n # or a simple bat file: \r\n python -c \"from ruffrgimportfixer import fix_imports;fix_imports(r'''%*''')\"\r\n\r\n \r\nDependencies:\r\n - ruff (https://github.com/astral-sh/ruff)\r\n - ripgrep (https://github.com/BurntSushi/ripgrep)\r\n\t# Both must be in sys.path\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Fixes missing imports using Ruff and RipGrep (CLI and import)",
"version": "0.11",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/ruffrgimportfixer"
},
"split_keywords": [
"import",
"ripgrep",
"ruff"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2f6c2f51c1d57d69496fde519699f5113cc4c6b1ebeb223f004e7245e436d4a8",
"md5": "1268909c5bb9c53396ceda0161dc6ed4",
"sha256": "39f8d0024f04f2e37aad422f2d5abbf06d06eda0c1968b0fe4b2b8ca59ca4760"
},
"downloads": -1,
"filename": "ruffrgimportfixer-0.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1268909c5bb9c53396ceda0161dc6ed4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6304,
"upload_time": "2024-02-01T21:04:57",
"upload_time_iso_8601": "2024-02-01T21:04:57.824689Z",
"url": "https://files.pythonhosted.org/packages/2f/6c/2f51c1d57d69496fde519699f5113cc4c6b1ebeb223f004e7245e436d4a8/ruffrgimportfixer-0.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5041acf3827cd66035c148f726a5c2f63f28d53123ed09d28b9ba1d875b88f70",
"md5": "36abc059b754e2d31119897d0fd9de61",
"sha256": "0630747225c31d2641f7709618251a3a70ac3e798edece3c1623aba4b6e896f0"
},
"downloads": -1,
"filename": "ruffrgimportfixer-0.11.tar.gz",
"has_sig": false,
"md5_digest": "36abc059b754e2d31119897d0fd9de61",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5300,
"upload_time": "2024-02-01T21:04:59",
"upload_time_iso_8601": "2024-02-01T21:04:59.554632Z",
"url": "https://files.pythonhosted.org/packages/50/41/acf3827cd66035c148f726a5c2f63f28d53123ed09d28b9ba1d875b88f70/ruffrgimportfixer-0.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-01 21:04:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "ruffrgimportfixer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "ruffrgimportfixer"
}