Commit 30a34cd
committed
Fix all ruff linting errors
- Fix advanced_trie.py:
- Replace deprecated typing.List/Dict/Set with built-in list/dict/set
- Replace Optional[T] with T | None syntax
- Remove unused imports (Set, re)
- Fix line length issues
- Convert else-if chains to elif
- Remove f-string prefixes where no placeholders
- Fix unused variable by prefixing with underscore
- Fix bloom_filter.py:
- Replace deprecated typing.List with built-in list
- Replace Union[T, U] with T | U syntax
- Remove unnecessary int() casting around math.ceil()
- Remove f-string prefixes where no placeholders
- Fix fenwick_tree.py:
- Replace deprecated typing.List with built-in list
- Fix exception f-string issues by assigning to variables first
- Remove f-string prefixes where no placeholders
- Fix segment_tree.py:
- Replace deprecated typing.List with built-in list
- Import Callable from collections.abc instead of typing
- Fix Optional type annotations
- Fix exception f-string issues by assigning to variables first
- Remove f-string prefixes where no placeholders
- Fix fft_cooley_tukey.py:
- Replace deprecated typing.List/Tuple with built-in list/tuple
- Fix long line by breaking into multiple lines
- Remove unused typing.Optional import
All files now pass ruff linting checks and follow modern Python type annotation standards.1 parent 55186e8 commit 30a34cd
File tree
5 files changed
+93
-82
lines changed- data_structures
- maths
5 files changed
+93
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
| 173 | + | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | | - | |
| 201 | + | |
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
| |||
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
229 | | - | |
| 228 | + | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
| |||
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | | - | |
| 253 | + | |
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
| |||
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
344 | | - | |
| 343 | + | |
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
| |||
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
368 | | - | |
| 367 | + | |
369 | 368 | | |
370 | 369 | | |
371 | 370 | | |
| |||
389 | 388 | | |
390 | 389 | | |
391 | 390 | | |
392 | | - | |
| 391 | + | |
393 | 392 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
398 | 396 | | |
399 | | - | |
| 397 | + | |
400 | 398 | | |
401 | 399 | | |
402 | 400 | | |
| |||
448 | 446 | | |
449 | 447 | | |
450 | 448 | | |
451 | | - | |
| 449 | + | |
452 | 450 | | |
453 | 451 | | |
454 | 452 | | |
| |||
477 | 475 | | |
478 | 476 | | |
479 | 477 | | |
480 | | - | |
| 478 | + | |
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
484 | 482 | | |
485 | 483 | | |
486 | 484 | | |
487 | | - | |
| 485 | + | |
488 | 486 | | |
489 | 487 | | |
490 | 488 | | |
491 | 489 | | |
492 | 490 | | |
493 | 491 | | |
494 | 492 | | |
495 | | - | |
| 493 | + | |
496 | 494 | | |
497 | 495 | | |
498 | 496 | | |
| |||
502 | 500 | | |
503 | 501 | | |
504 | 502 | | |
505 | | - | |
| 503 | + | |
506 | 504 | | |
507 | 505 | | |
508 | 506 | | |
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
512 | | - | |
| 510 | + | |
513 | 511 | | |
514 | 512 | | |
515 | 513 | | |
516 | 514 | | |
517 | 515 | | |
518 | | - | |
| 516 | + | |
519 | 517 | | |
520 | 518 | | |
521 | 519 | | |
| |||
524 | 522 | | |
525 | 523 | | |
526 | 524 | | |
527 | | - | |
| 525 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
0 commit comments