@@ -21,6 +21,26 @@ RUF065 Unnecessary `str()` conversion when formatting with `%s`
21217 | # % s + repr ()
2222 |
2323
24+ RUF065 Unnecessary ` repr()` conversion when formatting with ` %s` . Use ` %r` instead of ` %s`
25+ -- > RUF065 .py :8 :26
26+ |
27+ 7 | # % s + repr ()
28+ 8 | logging .info (" Hello %s" , repr (" World!" ))
29+ | ^^^^^^^^^^^^^^
30+ 9 | logging .log (logging .INFO , " Hello %s" , repr (" World!" ))
31+ |
32+
33+ RUF065 Unnecessary ` repr()` conversion when formatting with ` %s` . Use ` %r` instead of ` %s`
34+ -- > RUF065 .py :9 :39
35+ |
36+ 7 | # % s + repr ()
37+ 8 | logging .info (" Hello %s" , repr (" World!" ))
38+ 9 | logging .log (logging .INFO , " Hello %s" , repr (" World!" ))
39+ | ^^^^^^^^^^^^^^
40+ 10 |
41+ 11 | # % r + str ()
42+ |
43+
2444RUF065 Unnecessary ` str()` conversion when formatting with ` %s`
2545 -- > RUF065 .py :22 :18
2646 |
@@ -40,3 +60,160 @@ RUF065 Unnecessary `str()` conversion when formatting with `%s`
406024 |
416125 | # % s + repr ()
4262 |
63+
64+ RUF065 Unnecessary ` repr()` conversion when formatting with ` %s` . Use ` %r` instead of ` %s`
65+ -- > RUF065 .py :26 :18
66+ |
67+ 25 | # % s + repr ()
68+ 26 | info (" Hello %s" , repr (" World!" ))
69+ | ^^^^^^^^^^^^^^
70+ 27 | log (logging .INFO , " Hello %s" , repr (" World!" ))
71+ |
72+
73+ RUF065 Unnecessary ` repr()` conversion when formatting with ` %s` . Use ` %r` instead of ` %s`
74+ -- > RUF065 .py :27 :31
75+ |
76+ 25 | # % s + repr ()
77+ 26 | info (" Hello %s" , repr (" World!" ))
78+ 27 | log (logging .INFO , " Hello %s" , repr (" World!" ))
79+ | ^^^^^^^^^^^^^^
80+ 28 |
81+ 29 | # % r + str ()
82+ |
83+
84+ RUF065 Unnecessary ` repr()` conversion when formatting with ` %s` . Use ` %r` instead of ` %s`
85+ -- > RUF065 .py :44 :32
86+ |
87+ 42 | logging .warning (" Value: %r" , repr (42 ))
88+ 43 | logging .error (" Error: %r" , repr ([1 , 2 , 3 ]))
89+ 44 | logging .info (" Debug info: %s" , repr (" test\n string" ))
90+ | ^^^^^^^^^^^^^^^^^^^^
91+ 45 | logging .warning (" Value: %s" , repr (42 ))
92+ |
93+
94+ RUF065 Unnecessary ` repr()` conversion when formatting with ` %s` . Use ` %r` instead of ` %s`
95+ -- > RUF065 .py :45 :30
96+ |
97+ 43 | logging .error (" Error: %r" , repr ([1 , 2 , 3 ]))
98+ 44 | logging .info (" Debug info: %s" , repr (" test\n string" ))
99+ 45 | logging .warning (" Value: %s" , repr (42 ))
100+ | ^^^^^^^^
101+ 46 |
102+ 47 | # % s + ascii ()
103+ |
104+
105+ RUF065 Unnecessary ` ascii()` conversion when formatting with ` %s` . Use ` %a` instead of ` %s`
106+ -- > RUF065 .py :48 :27
107+ |
108+ 47 | # % s + ascii ()
109+ 48 | logging .info (" ASCII: %s" , ascii (" Hello\n World" ))
110+ | ^^^^^^^^^^^^^^^^^^^^^
111+ 49 | logging .warning (" ASCII: %s" , ascii (" test" ))
112+ |
113+
114+ RUF065 Unnecessary ` ascii()` conversion when formatting with ` %s` . Use ` %a` instead of ` %s`
115+ -- > RUF065 .py :49 :30
116+ |
117+ 47 | # % s + ascii ()
118+ 48 | logging .info (" ASCII: %s" , ascii (" Hello\n World" ))
119+ 49 | logging .warning (" ASCII: %s" , ascii (" test" ))
120+ | ^^^^^^^^^^^^^
121+ 50 |
122+ 51 | # % s + oct ()
123+ |
124+
125+ RUF065 Unnecessary ` oct()` conversion when formatting with ` %s` . Use ` %#o` instead of ` %s`
126+ -- > RUF065 .py :52 :27
127+ |
128+ 51 | # % s + oct ()
129+ 52 | logging .info (" Octal: %s" , oct (42 ))
130+ | ^^^^^^^
131+ 53 | logging .warning (" Octal: %s" , oct (255 ))
132+ |
133+
134+ RUF065 Unnecessary ` oct()` conversion when formatting with ` %s` . Use ` %#o` instead of ` %s`
135+ -- > RUF065 .py :53 :30
136+ |
137+ 51 | # % s + oct ()
138+ 52 | logging .info (" Octal: %s" , oct (42 ))
139+ 53 | logging .warning (" Octal: %s" , oct (255 ))
140+ | ^^^^^^^^
141+ 54 |
142+ 55 | # % s + hex ()
143+ |
144+
145+ RUF065 Unnecessary ` hex()` conversion when formatting with ` %s` . Use ` %#x` instead of ` %s`
146+ -- > RUF065 .py :56 :25
147+ |
148+ 55 | # % s + hex ()
149+ 56 | logging .info (" Hex: %s" , hex (42 ))
150+ | ^^^^^^^
151+ 57 | logging .warning (" Hex: %s" , hex (255 ))
152+ |
153+
154+ RUF065 Unnecessary ` hex()` conversion when formatting with ` %s` . Use ` %#x` instead of ` %s`
155+ -- > RUF065 .py :57 :28
156+ |
157+ 55 | # % s + hex ()
158+ 56 | logging .info (" Hex: %s" , hex (42 ))
159+ 57 | logging .warning (" Hex: %s" , hex (255 ))
160+ | ^^^^^^^^
161+ |
162+
163+ RUF065 Unnecessary ` ascii()` conversion when formatting with ` %s` . Use ` %a` instead of ` %s`
164+ -- > RUF065 .py :63 :19
165+ |
166+ 61 | from logging import info , log
167+ 62 |
168+ 63 | info (" ASCII: %s" , ascii (" Hello\n World" ))
169+ | ^^^^^^^^^^^^^^^^^^^^^
170+ 64 | log (logging .INFO , " ASCII: %s" , ascii (" test" ))
171+ |
172+
173+ RUF065 Unnecessary ` ascii()` conversion when formatting with ` %s` . Use ` %a` instead of ` %s`
174+ -- > RUF065 .py :64 :32
175+ |
176+ 63 | info (" ASCII: %s" , ascii (" Hello\n World" ))
177+ 64 | log (logging .INFO , " ASCII: %s" , ascii (" test" ))
178+ | ^^^^^^^^^^^^^
179+ 65 |
180+ 66 | info (" Octal: %s" , oct (42 ))
181+ |
182+
183+ RUF065 Unnecessary ` oct()` conversion when formatting with ` %s` . Use ` %#o` instead of ` %s`
184+ -- > RUF065 .py :66 :19
185+ |
186+ 64 | log (logging .INFO , " ASCII: %s" , ascii (" test" ))
187+ 65 |
188+ 66 | info (" Octal: %s" , oct (42 ))
189+ | ^^^^^^^
190+ 67 | log (logging .INFO , " Octal: %s" , oct (255 ))
191+ |
192+
193+ RUF065 Unnecessary ` oct()` conversion when formatting with ` %s` . Use ` %#o` instead of ` %s`
194+ -- > RUF065 .py :67 :32
195+ |
196+ 66 | info (" Octal: %s" , oct (42 ))
197+ 67 | log (logging .INFO , " Octal: %s" , oct (255 ))
198+ | ^^^^^^^^
199+ 68 |
200+ 69 | info (" Hex: %s" , hex (42 ))
201+ |
202+
203+ RUF065 Unnecessary ` hex()` conversion when formatting with ` %s` . Use ` %#x` instead of ` %s`
204+ -- > RUF065 .py :69 :17
205+ |
206+ 67 | log (logging .INFO , " Octal: %s" , oct (255 ))
207+ 68 |
208+ 69 | info (" Hex: %s" , hex (42 ))
209+ | ^^^^^^^
210+ 70 | log (logging .INFO , " Hex: %s" , hex (255 ))
211+ |
212+
213+ RUF065 Unnecessary ` hex()` conversion when formatting with ` %s` . Use ` %#x` instead of ` %s`
214+ -- > RUF065 .py :70 :30
215+ |
216+ 69 | info (" Hex: %s" , hex (42 ))
217+ 70 | log (logging .INFO , " Hex: %s" , hex (255 ))
218+ | ^^^^^^^^
219+ |
0 commit comments