code-towel 1.0.0__tar.gz → 1.0.2__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.
- {code_towel-1.0.0/src/code_towel.egg-info → code_towel-1.0.2}/PKG-INFO +12 -12
- {code_towel-1.0.0 → code_towel-1.0.2}/README.md +11 -11
- {code_towel-1.0.0 → code_towel-1.0.2}/pyproject.toml +1 -1
- {code_towel-1.0.0 → code_towel-1.0.2/src/code_towel.egg-info}/PKG-INFO +12 -12
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/cli.py +22 -22
- {code_towel-1.0.0 → code_towel-1.0.2}/LICENSE +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/setup.cfg +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/code_towel.egg-info/SOURCES.txt +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/code_towel.egg-info/dependency_links.txt +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/code_towel.egg-info/entry_points.txt +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/code_towel.egg-info/requires.txt +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/code_towel.egg-info/top_level.txt +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/__init__.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/__init__.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/assignment_analyzer.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/ast_normalizer.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/ast_pretty_printer.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/binding_detector.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/block_signature.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/builtins.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/exceptions.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/extractor.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/models.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/nominal_unifier.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/orphan_detector.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/pipeline.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/project_layout.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/refactor_engine.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/scope_analyzer.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/unifier.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/visitor_utils.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/src/towel/unification/visitors.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_ancestor_insertion.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_assignment_analyzer_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_ast_normalizer_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_ast_pretty_printer.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_ast_pretty_printer_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_ast_pretty_printer_more.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_binding_detector.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_binding_detector_edge_cases.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_bindings.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_bindings_additional.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_breakers.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_builtins_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_comprehensive_coverage.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_crossfile_integration.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_crossfile_observational_equivalence.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_engine_adversarial.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_exceptions.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_additional_branches.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_augassign_and_fstrings.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_callee_and_multi_return.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_edge_cases.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_final_lines.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_generate_call_variants.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_more_paths.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_preamble_and_call_mapping.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_remaining_branches.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_return_statements.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_extractor_substituter_and_helpers.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_final_coverage_push.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_free_variable_correspondence.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_fstrings.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_helpers.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_method_level_and_attributes.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_nominal_unifier.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_observational_equivalence.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_orphan_detection.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_orphan_detector_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_overlap_filtering.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_pipeline_api.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_pipeline_phases.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_progress_modes.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_project_layout_and_imports.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_project_layout_behavior.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_promotion_and_mangling.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_refactor_engine_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_refactor_engine_edge_cases.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_refactor_engine_more.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_refactor_engine_targeted_branches.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_refactoring_engine.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_regression.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_regressions_broader.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_return_values.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_scope_analyzer.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_scope_analyzer_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_signature_prefilter.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_additional_branches.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_batch2.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_batch3.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_batch4.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_batch5.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_bound_variables.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_comprehensions.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_comprehensive.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_core.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_edge_cases.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_more_branches.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_unifier_state_reset.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_validation_partial_lifetime.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_variable_capture_bug.py +0 -0
- {code_towel-1.0.0 → code_towel-1.0.2}/tests/test_visitor_utils_comprehensive.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-towel
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A Python tool that DRYs your code - finds and refactors repeated code using unification-based analysis
|
|
5
5
|
Author: Eric Allen
|
|
6
6
|
License: Apache License
|
|
@@ -283,13 +283,13 @@ After installation, Towel provides three main commands:
|
|
|
283
283
|
|
|
284
284
|
```bash
|
|
285
285
|
# Preview duplicates (read-only)
|
|
286
|
-
|
|
286
|
+
towel preview <file_or_directory>
|
|
287
287
|
|
|
288
288
|
# Apply refactorings
|
|
289
|
-
|
|
289
|
+
towel dry <input> <output>
|
|
290
290
|
|
|
291
291
|
# Rename extracted functions with LLM assistance
|
|
292
|
-
|
|
292
|
+
towel rename-helpers <directory>
|
|
293
293
|
```
|
|
294
294
|
|
|
295
295
|
### Direct Script Usage
|
|
@@ -420,20 +420,20 @@ After running the DRY tool, extracted functions are named `__extracted_func_*` w
|
|
|
420
420
|
|
|
421
421
|
```bash
|
|
422
422
|
# Interactive mode: Generate LLM prompt and apply suggestions
|
|
423
|
-
|
|
423
|
+
towel rename-helpers src/
|
|
424
424
|
|
|
425
425
|
# List all extracted helpers
|
|
426
|
-
|
|
426
|
+
towel rename-helpers src/ --list
|
|
427
427
|
|
|
428
428
|
# Apply renamings from a JSON file
|
|
429
|
-
|
|
429
|
+
towel rename-helpers src/ --rename-file renames.json
|
|
430
430
|
|
|
431
431
|
# Dry run (preview only)
|
|
432
|
-
|
|
432
|
+
towel rename-helpers src/ --dry-run
|
|
433
433
|
|
|
434
434
|
# Limit to specific files or functions
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
towel rename-helpers src/ --file mymodule.py
|
|
436
|
+
towel rename-helpers src/ --function __extracted_func_7
|
|
437
437
|
```
|
|
438
438
|
|
|
439
439
|
#### How It Works
|
|
@@ -455,10 +455,10 @@ The `rename-helpers` command works in two modes:
|
|
|
455
455
|
Example workflow:
|
|
456
456
|
```bash
|
|
457
457
|
# Run the refactoring tool
|
|
458
|
-
|
|
458
|
+
towel dry src/ src_cleaned/
|
|
459
459
|
|
|
460
460
|
# Use LLM to rename extracted functions
|
|
461
|
-
|
|
461
|
+
towel rename-helpers src_cleaned/
|
|
462
462
|
# (Follow the interactive prompts to get LLM suggestions)
|
|
463
463
|
```
|
|
464
464
|
|
|
@@ -52,13 +52,13 @@ After installation, Towel provides three main commands:
|
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
54
|
# Preview duplicates (read-only)
|
|
55
|
-
|
|
55
|
+
towel preview <file_or_directory>
|
|
56
56
|
|
|
57
57
|
# Apply refactorings
|
|
58
|
-
|
|
58
|
+
towel dry <input> <output>
|
|
59
59
|
|
|
60
60
|
# Rename extracted functions with LLM assistance
|
|
61
|
-
|
|
61
|
+
towel rename-helpers <directory>
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
### Direct Script Usage
|
|
@@ -189,20 +189,20 @@ After running the DRY tool, extracted functions are named `__extracted_func_*` w
|
|
|
189
189
|
|
|
190
190
|
```bash
|
|
191
191
|
# Interactive mode: Generate LLM prompt and apply suggestions
|
|
192
|
-
|
|
192
|
+
towel rename-helpers src/
|
|
193
193
|
|
|
194
194
|
# List all extracted helpers
|
|
195
|
-
|
|
195
|
+
towel rename-helpers src/ --list
|
|
196
196
|
|
|
197
197
|
# Apply renamings from a JSON file
|
|
198
|
-
|
|
198
|
+
towel rename-helpers src/ --rename-file renames.json
|
|
199
199
|
|
|
200
200
|
# Dry run (preview only)
|
|
201
|
-
|
|
201
|
+
towel rename-helpers src/ --dry-run
|
|
202
202
|
|
|
203
203
|
# Limit to specific files or functions
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
towel rename-helpers src/ --file mymodule.py
|
|
205
|
+
towel rename-helpers src/ --function __extracted_func_7
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
#### How It Works
|
|
@@ -224,10 +224,10 @@ The `rename-helpers` command works in two modes:
|
|
|
224
224
|
Example workflow:
|
|
225
225
|
```bash
|
|
226
226
|
# Run the refactoring tool
|
|
227
|
-
|
|
227
|
+
towel dry src/ src_cleaned/
|
|
228
228
|
|
|
229
229
|
# Use LLM to rename extracted functions
|
|
230
|
-
|
|
230
|
+
towel rename-helpers src_cleaned/
|
|
231
231
|
# (Follow the interactive prompts to get LLM suggestions)
|
|
232
232
|
```
|
|
233
233
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "code-towel"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
description = "A Python tool that DRYs your code - finds and refactors repeated code using unification-based analysis"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Eric Allen"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-towel
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A Python tool that DRYs your code - finds and refactors repeated code using unification-based analysis
|
|
5
5
|
Author: Eric Allen
|
|
6
6
|
License: Apache License
|
|
@@ -283,13 +283,13 @@ After installation, Towel provides three main commands:
|
|
|
283
283
|
|
|
284
284
|
```bash
|
|
285
285
|
# Preview duplicates (read-only)
|
|
286
|
-
|
|
286
|
+
towel preview <file_or_directory>
|
|
287
287
|
|
|
288
288
|
# Apply refactorings
|
|
289
|
-
|
|
289
|
+
towel dry <input> <output>
|
|
290
290
|
|
|
291
291
|
# Rename extracted functions with LLM assistance
|
|
292
|
-
|
|
292
|
+
towel rename-helpers <directory>
|
|
293
293
|
```
|
|
294
294
|
|
|
295
295
|
### Direct Script Usage
|
|
@@ -420,20 +420,20 @@ After running the DRY tool, extracted functions are named `__extracted_func_*` w
|
|
|
420
420
|
|
|
421
421
|
```bash
|
|
422
422
|
# Interactive mode: Generate LLM prompt and apply suggestions
|
|
423
|
-
|
|
423
|
+
towel rename-helpers src/
|
|
424
424
|
|
|
425
425
|
# List all extracted helpers
|
|
426
|
-
|
|
426
|
+
towel rename-helpers src/ --list
|
|
427
427
|
|
|
428
428
|
# Apply renamings from a JSON file
|
|
429
|
-
|
|
429
|
+
towel rename-helpers src/ --rename-file renames.json
|
|
430
430
|
|
|
431
431
|
# Dry run (preview only)
|
|
432
|
-
|
|
432
|
+
towel rename-helpers src/ --dry-run
|
|
433
433
|
|
|
434
434
|
# Limit to specific files or functions
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
towel rename-helpers src/ --file mymodule.py
|
|
436
|
+
towel rename-helpers src/ --function __extracted_func_7
|
|
437
437
|
```
|
|
438
438
|
|
|
439
439
|
#### How It Works
|
|
@@ -455,10 +455,10 @@ The `rename-helpers` command works in two modes:
|
|
|
455
455
|
Example workflow:
|
|
456
456
|
```bash
|
|
457
457
|
# Run the refactoring tool
|
|
458
|
-
|
|
458
|
+
towel dry src/ src_cleaned/
|
|
459
459
|
|
|
460
460
|
# Use LLM to rename extracted functions
|
|
461
|
-
|
|
461
|
+
towel rename-helpers src_cleaned/
|
|
462
462
|
# (Follow the interactive prompts to get LLM suggestions)
|
|
463
463
|
```
|
|
464
464
|
|
|
@@ -21,20 +21,20 @@ def main() -> None:
|
|
|
21
21
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
22
22
|
epilog="""
|
|
23
23
|
Examples:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
towel preview src/ # Preview duplicates (read-only)
|
|
25
|
+
towel dry src/ cleaned/ # Apply refactorings to new directory
|
|
26
|
+
towel dry src/ src/ # Apply refactorings in-place
|
|
27
|
+
towel rename-helpers # Rename extracted functions with LLM assistance
|
|
28
28
|
|
|
29
29
|
For more help on a specific command:
|
|
30
|
-
|
|
30
|
+
towel <command> --help
|
|
31
31
|
""",
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
parser.add_argument(
|
|
35
35
|
"--version",
|
|
36
36
|
action="version",
|
|
37
|
-
version="towel 1.0.
|
|
37
|
+
version="towel 1.0.2",
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
@@ -68,10 +68,10 @@ def _add_dry_parser(subparsers) -> None:
|
|
|
68
68
|
description="Analyze and apply unification-based refactorings to file(s) or directories.",
|
|
69
69
|
epilog="""
|
|
70
70
|
Examples:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
towel dry src/ cleaned/ # Refactor directory until fixed point
|
|
72
|
+
towel dry file.py file_out.py --non-interactive # Non-interactive single file
|
|
73
|
+
towel dry src/ out/ --max-iterations 50 # Cap at 50 applied refactorings
|
|
74
|
+
towel dry src/ out/ --progress detail # Verbose per-phase output
|
|
75
75
|
""",
|
|
76
76
|
)
|
|
77
77
|
|
|
@@ -196,20 +196,20 @@ The tool works in two modes:
|
|
|
196
196
|
epilog="""
|
|
197
197
|
Examples:
|
|
198
198
|
# Interactive mode: generate LLM prompt and apply suggestions
|
|
199
|
-
|
|
199
|
+
towel rename-helpers src/
|
|
200
200
|
|
|
201
201
|
# List all extracted helpers
|
|
202
|
-
|
|
202
|
+
towel rename-helpers src/ --list
|
|
203
203
|
|
|
204
204
|
# Apply renamings from a JSON file
|
|
205
|
-
|
|
205
|
+
towel rename-helpers src/ --rename-file renames.json
|
|
206
206
|
|
|
207
207
|
# Dry run (preview only)
|
|
208
|
-
|
|
208
|
+
towel rename-helpers src/ --dry-run
|
|
209
209
|
|
|
210
210
|
# Specify specific files or functions
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
towel rename-helpers src/ --file mymodule.py
|
|
212
|
+
towel rename-helpers src/ --function __extracted_func_7
|
|
213
213
|
""",
|
|
214
214
|
)
|
|
215
215
|
|
|
@@ -416,7 +416,7 @@ def _run_preview(args: argparse.Namespace) -> None:
|
|
|
416
416
|
else:
|
|
417
417
|
print(f"Analyzing directory: {target}")
|
|
418
418
|
all_proposals = engine.analyze_directory(
|
|
419
|
-
target, recursive=True, verbose=True, progress="
|
|
419
|
+
target, recursive=True, verbose=True, progress="auto"
|
|
420
420
|
)
|
|
421
421
|
|
|
422
422
|
print(f"\nFound {len(all_proposals)} refactoring opportunities")
|
|
@@ -442,9 +442,9 @@ def _run_preview(args: argparse.Namespace) -> None:
|
|
|
442
442
|
|
|
443
443
|
# Show which files are affected
|
|
444
444
|
files_affected = set()
|
|
445
|
-
for
|
|
446
|
-
if
|
|
447
|
-
files_affected.add(
|
|
445
|
+
for replacement in prop.replacements:
|
|
446
|
+
if replacement.file_path:
|
|
447
|
+
files_affected.add(replacement.file_path)
|
|
448
448
|
else:
|
|
449
449
|
files_affected.add(prop.file_path)
|
|
450
450
|
|
|
@@ -474,9 +474,9 @@ def _run_preview(args: argparse.Namespace) -> None:
|
|
|
474
474
|
print("\n" + "=" * 70)
|
|
475
475
|
print("\nTo apply these refactorings, run:")
|
|
476
476
|
if is_file:
|
|
477
|
-
print(f"
|
|
477
|
+
print(f" towel dry {target} <output>")
|
|
478
478
|
else:
|
|
479
|
-
print(f"
|
|
479
|
+
print(f" towel dry {target} <output_dir>")
|
|
480
480
|
print()
|
|
481
481
|
|
|
482
482
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|