Commit 7915bc6
pullfrog
Add exponential function spacing option
This commit adds a new --exponential-function-spacing flag that applies
exponentially increasing blank lines between function definitions. The
spacing follows the pattern 2^n where n is the function index (0-based):
- 1st to 2nd function: 1 blank line (2^0)
- 2nd to 3rd function: 2 blank lines (2^1)
- 3rd to 4th function: 4 blank lines (2^2)
- 4th to 5th function: 8 blank lines (2^3)
This feature discourages developers from creating too many functions in
a single file by making the visual separation increasingly dramatic.
Changes:
- Added exponential_function_spacing boolean field to Mode class
- Updated Mode.__hash__ and get_cache_key to include new field
- Added function_count_at_depth tracking to EmptyLineTracker
- Modified empty line calculation logic to apply exponential spacing
- Added --exponential-function-spacing CLI option1 parent b8c15b1 commit 7915bc6
3 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
334 | 343 | | |
335 | 344 | | |
336 | 345 | | |
| |||
532 | 541 | | |
533 | 542 | | |
534 | 543 | | |
| 544 | + | |
535 | 545 | | |
536 | 546 | | |
537 | 547 | | |
| |||
640 | 650 | | |
641 | 651 | | |
642 | 652 | | |
| 653 | + | |
643 | 654 | | |
644 | 655 | | |
645 | 656 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| 547 | + | |
547 | 548 | | |
548 | 549 | | |
549 | 550 | | |
| |||
684 | 685 | | |
685 | 686 | | |
686 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
687 | 692 | | |
688 | 693 | | |
689 | 694 | | |
| |||
776 | 781 | | |
777 | 782 | | |
778 | 783 | | |
779 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
780 | 788 | | |
781 | 789 | | |
782 | 790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
| 337 | + | |
335 | 338 | | |
0 commit comments