auto-code-fixer 0.3.7__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/PKG-INFO +26 -1
  2. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/README.md +25 -0
  3. auto_code_fixer-0.4.0/auto_code_fixer/__init__.py +1 -0
  4. auto_code_fixer-0.4.0/auto_code_fixer/cli.py +1254 -0
  5. auto_code_fixer-0.4.0/auto_code_fixer/reporting.py +61 -0
  6. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/sandbox.py +35 -0
  7. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/utils.py +42 -0
  8. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer.egg-info/PKG-INFO +26 -1
  9. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer.egg-info/SOURCES.txt +3 -1
  10. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/pyproject.toml +1 -1
  11. auto_code_fixer-0.4.0/tests/test_reporting.py +23 -0
  12. auto_code_fixer-0.3.7/auto_code_fixer/__init__.py +0 -1
  13. auto_code_fixer-0.3.7/auto_code_fixer/cli.py +0 -669
  14. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/LICENSE +0 -0
  15. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/approval.py +0 -0
  16. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/command_runner.py +0 -0
  17. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/fixer.py +0 -0
  18. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/installer.py +0 -0
  19. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/models.py +0 -0
  20. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/patch_protocol.py +0 -0
  21. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/patcher.py +0 -0
  22. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/plan.py +0 -0
  23. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/runner.py +0 -0
  24. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/traceback_utils.py +0 -0
  25. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer/venv_manager.py +0 -0
  26. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer.egg-info/dependency_links.txt +0 -0
  27. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer.egg-info/entry_points.txt +0 -0
  28. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer.egg-info/requires.txt +0 -0
  29. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/auto_code_fixer.egg-info/top_level.txt +0 -0
  30. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/setup.cfg +0 -0
  31. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/tests/test_approval_and_guards.py +0 -0
  32. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/tests/test_atomic_write.py +0 -0
  33. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/tests/test_fix_imported_file.py +0 -0
  34. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/tests/test_internal_imports.py +0 -0
  35. {auto_code_fixer-0.3.7 → auto_code_fixer-0.4.0}/tests/test_patch_protocol.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-code-fixer
3
- Version: 0.3.7
3
+ Version: 0.4.0
4
4
  Summary: Automatically fix Python code using ChatGPT
5
5
  Author-email: Arif Shah <ashah7775@gmail.com>
6
6
  License: MIT
@@ -108,6 +108,15 @@ auto-code-fixer path/to/main.py --project-root . --dry-run
108
108
 
109
109
  ## Advanced options
110
110
 
111
+ ### Fixpack mode (folder/package runner)
112
+ Fixpack runs a command (default: `pytest -q`) against a **full-project sandbox**, then iteratively fixes the failing file(s) until green or you hit `--max-retries`.
113
+
114
+ ```bash
115
+ auto-code-fixer path/to/package --project-root . --fixpack --no-ask
116
+ # equivalent explicit command:
117
+ auto-code-fixer path/to/package --project-root . --fixpack --run "pytest -q" --no-ask
118
+ ```
119
+
111
120
  ### Run a custom command (pytest, etc.)
112
121
  Instead of `python main.py`, run tests:
113
122
 
@@ -156,6 +165,13 @@ To disable this and use legacy full-text mode only:
156
165
  auto-code-fixer main.py --legacy-mode
157
166
  ```
158
167
 
168
+ ### Ruff-first mode (best-effort)
169
+ Before calling the LLM, you can try Ruff auto-fixes (including import sorting) and Ruff formatting:
170
+
171
+ ```bash
172
+ auto-code-fixer path/to/package --project-root . --fixpack --ruff-first
173
+ ```
174
+
159
175
  ### Optional formatting / linting (best-effort)
160
176
  ```bash
161
177
  auto-code-fixer main.py --format black
@@ -163,6 +179,15 @@ auto-code-fixer main.py --lint ruff --fix
163
179
  ```
164
180
  These run inside the sandbox venv and are skipped if the tools are not installed.
165
181
 
182
+ ### JSON report (explain)
183
+ Write a machine-readable report with attempts, files touched, and unified diffs:
184
+
185
+ ```bash
186
+ auto-code-fixer main.py --explain
187
+ # or
188
+ auto-code-fixer main.py --report /tmp/report.json
189
+ ```
190
+
166
191
  ---
167
192
 
168
193
  ## Environment variables
@@ -87,6 +87,15 @@ auto-code-fixer path/to/main.py --project-root . --dry-run
87
87
 
88
88
  ## Advanced options
89
89
 
90
+ ### Fixpack mode (folder/package runner)
91
+ Fixpack runs a command (default: `pytest -q`) against a **full-project sandbox**, then iteratively fixes the failing file(s) until green or you hit `--max-retries`.
92
+
93
+ ```bash
94
+ auto-code-fixer path/to/package --project-root . --fixpack --no-ask
95
+ # equivalent explicit command:
96
+ auto-code-fixer path/to/package --project-root . --fixpack --run "pytest -q" --no-ask
97
+ ```
98
+
90
99
  ### Run a custom command (pytest, etc.)
91
100
  Instead of `python main.py`, run tests:
92
101
 
@@ -135,6 +144,13 @@ To disable this and use legacy full-text mode only:
135
144
  auto-code-fixer main.py --legacy-mode
136
145
  ```
137
146
 
147
+ ### Ruff-first mode (best-effort)
148
+ Before calling the LLM, you can try Ruff auto-fixes (including import sorting) and Ruff formatting:
149
+
150
+ ```bash
151
+ auto-code-fixer path/to/package --project-root . --fixpack --ruff-first
152
+ ```
153
+
138
154
  ### Optional formatting / linting (best-effort)
139
155
  ```bash
140
156
  auto-code-fixer main.py --format black
@@ -142,6 +158,15 @@ auto-code-fixer main.py --lint ruff --fix
142
158
  ```
143
159
  These run inside the sandbox venv and are skipped if the tools are not installed.
144
160
 
161
+ ### JSON report (explain)
162
+ Write a machine-readable report with attempts, files touched, and unified diffs:
163
+
164
+ ```bash
165
+ auto-code-fixer main.py --explain
166
+ # or
167
+ auto-code-fixer main.py --report /tmp/report.json
168
+ ```
169
+
145
170
  ---
146
171
 
147
172
  ## Environment variables
@@ -0,0 +1 @@
1
+ __version__ = "0.4.0"