Commit 5177ed4
committed
[formatter] Stabilize fix for single-with-item formatting with trailing comment (#16603)
## Summary
This PR stabilizies the fix for
#14001
We try to only make breaking formatting changes once a year. However,
the plan was to release this fix as part of Ruff 0.9 but I somehow
missed it when promoting all other formatter changes.
I think it's worth making an exception here considering that this is a
bug fix, it improves readability, and it should be rare
(very few files in a single project). Our version policy explicitly
allows breaking formatter changes in any minor release and the idea of
only making breaking formatter changes once a year is mainly to avoid
multiple releases throughout the year that introduce large formatter
changes
Closes #14001
## Test Plan
Updated snapshot1 parent 7514e08 commit 5177ed4
File tree
3 files changed
+16
-99
lines changed- crates/ruff_python_formatter
- src
- other
- tests/snapshots
3 files changed
+16
-99
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 120 | + | |
126 | 121 | | |
127 | 122 | | |
128 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
Lines changed: 15 additions & 86 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
781 | 777 | | |
| 778 | + | |
| 779 | + | |
782 | 780 | | |
783 | 781 | | |
784 | 782 | | |
785 | 783 | | |
786 | 784 | | |
787 | 785 | | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
795 | 789 | | |
| 790 | + | |
| 791 | + | |
796 | 792 | | |
797 | 793 | | |
798 | 794 | | |
799 | 795 | | |
800 | 796 | | |
801 | 797 | | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
809 | 801 | | |
| 802 | + | |
| 803 | + | |
810 | 804 | | |
811 | 805 | | |
812 | 806 | | |
813 | 807 | | |
814 | 808 | | |
815 | 809 | | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | 810 | | |
882 | 811 | | |
883 | 812 | | |
| |||
0 commit comments