@@ -536,14 +536,16 @@ PTH210.py:54:1: PTH210 [*] Dotless suffix passed to `.with_suffix()`
536
536
54 | + windows_path .with_suffix (u ' .' " json" )
537
537
55 55 | windows_path .with_suffix (suffix = " js" )
538
538
56 56 |
539
- 57 57 |
539
+ 57 57 | Path (). with_suffix ( " . " )
540
540
541
541
PTH210 .py :55 :1 : PTH210 [* ] Dotless suffix passed to ` .with_suffix()`
542
542
|
543
543
53 | windows_path .with_suffix (r " s" )
544
544
54 | windows_path .with_suffix (u ' ' " json" )
545
545
55 | windows_path .with_suffix (suffix = " js" )
546
546
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PTH210
547
+ 56 |
548
+ 57 | Path ().with_suffix (" ." )
547
549
|
548
550
= help : Add a leading dot
549
551
@@ -554,5 +556,140 @@ PTH210.py:55:1: PTH210 [*] Dotless suffix passed to `.with_suffix()`
554
556
55 | - windows_path .with_suffix (suffix = " js" )
555
557
55 | + windows_path .with_suffix (suffix = " .js" )
556
558
56 56 |
557
- 57 57 |
558
- 58 58 | ### No errors
559
+ 57 57 | Path ().with_suffix (" ." )
560
+ 58 58 | Path ().with_suffix (" py" )
561
+
562
+ PTH210 .py :57 :1 : PTH210 Invalid suffix passed to ` .with_suffix()`
563
+ |
564
+ 55 | windows_path .with_suffix (suffix = " js" )
565
+ 56 |
566
+ 57 | Path ().with_suffix (" ." )
567
+ | ^^^^^^^^^^^^^^^^^^^^^^^ PTH210
568
+ 58 | Path ().with_suffix (" py" )
569
+ 59 | PosixPath ().with_suffix (" py" )
570
+ |
571
+ = help : Remove " ." or extend to valid suffix
572
+
573
+ PTH210 .py :58 :1 : PTH210 [* ] Dotless suffix passed to ` .with_suffix()`
574
+ |
575
+ 57 | Path ().with_suffix (" ." )
576
+ 58 | Path ().with_suffix (" py" )
577
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ PTH210
578
+ 59 | PosixPath ().with_suffix (" py" )
579
+ 60 | PurePath ().with_suffix (" py" )
580
+ |
581
+ = help : Add a leading dot
582
+
583
+ ℹ Unsafe fix
584
+ 55 55 | windows_path .with_suffix (suffix = " js" )
585
+ 56 56 |
586
+ 57 57 | Path ().with_suffix (" ." )
587
+ 58 | - Path ().with_suffix (" py" )
588
+ 58 | + Path ().with_suffix (" .py" )
589
+ 59 59 | PosixPath ().with_suffix (" py" )
590
+ 60 60 | PurePath ().with_suffix (" py" )
591
+ 61 61 | PurePosixPath ().with_suffix (" py" )
592
+
593
+ PTH210 .py :59 :1 : PTH210 [* ] Dotless suffix passed to ` .with_suffix()`
594
+ |
595
+ 57 | Path ().with_suffix (" ." )
596
+ 58 | Path ().with_suffix (" py" )
597
+ 59 | PosixPath ().with_suffix (" py" )
598
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PTH210
599
+ 60 | PurePath ().with_suffix (" py" )
600
+ 61 | PurePosixPath ().with_suffix (" py" )
601
+ |
602
+ = help : Add a leading dot
603
+
604
+ ℹ Unsafe fix
605
+ 56 56 |
606
+ 57 57 | Path ().with_suffix (" ." )
607
+ 58 58 | Path ().with_suffix (" py" )
608
+ 59 | - PosixPath ().with_suffix (" py" )
609
+ 59 | + PosixPath ().with_suffix (" .py" )
610
+ 60 60 | PurePath ().with_suffix (" py" )
611
+ 61 61 | PurePosixPath ().with_suffix (" py" )
612
+ 62 62 | PureWindowsPath ().with_suffix (" py" )
613
+
614
+ PTH210 .py :60 :1 : PTH210 [* ] Dotless suffix passed to ` .with_suffix()`
615
+ |
616
+ 58 | Path ().with_suffix (" py" )
617
+ 59 | PosixPath ().with_suffix (" py" )
618
+ 60 | PurePath ().with_suffix (" py" )
619
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PTH210
620
+ 61 | PurePosixPath ().with_suffix (" py" )
621
+ 62 | PureWindowsPath ().with_suffix (" py" )
622
+ |
623
+ = help : Add a leading dot
624
+
625
+ ℹ Unsafe fix
626
+ 57 57 | Path ().with_suffix (" ." )
627
+ 58 58 | Path ().with_suffix (" py" )
628
+ 59 59 | PosixPath ().with_suffix (" py" )
629
+ 60 | - PurePath ().with_suffix (" py" )
630
+ 60 | + PurePath ().with_suffix (" .py" )
631
+ 61 61 | PurePosixPath ().with_suffix (" py" )
632
+ 62 62 | PureWindowsPath ().with_suffix (" py" )
633
+ 63 63 | WindowsPath ().with_suffix (" py" )
634
+
635
+ PTH210 .py :61 :1 : PTH210 [* ] Dotless suffix passed to ` .with_suffix()`
636
+ |
637
+ 59 | PosixPath ().with_suffix (" py" )
638
+ 60 | PurePath ().with_suffix (" py" )
639
+ 61 | PurePosixPath ().with_suffix (" py" )
640
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PTH210
641
+ 62 | PureWindowsPath ().with_suffix (" py" )
642
+ 63 | WindowsPath ().with_suffix (" py" )
643
+ |
644
+ = help : Add a leading dot
645
+
646
+ ℹ Unsafe fix
647
+ 58 58 | Path ().with_suffix (" py" )
648
+ 59 59 | PosixPath ().with_suffix (" py" )
649
+ 60 60 | PurePath ().with_suffix (" py" )
650
+ 61 | - PurePosixPath ().with_suffix (" py" )
651
+ 61 | + PurePosixPath ().with_suffix (" .py" )
652
+ 62 62 | PureWindowsPath ().with_suffix (" py" )
653
+ 63 63 | WindowsPath ().with_suffix (" py" )
654
+ 64 64 |
655
+
656
+ PTH210 .py :62 :1 : PTH210 [* ] Dotless suffix passed to ` .with_suffix()`
657
+ |
658
+ 60 | PurePath ().with_suffix (" py" )
659
+ 61 | PurePosixPath ().with_suffix (" py" )
660
+ 62 | PureWindowsPath ().with_suffix (" py" )
661
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PTH210
662
+ 63 | WindowsPath ().with_suffix (" py" )
663
+ |
664
+ = help : Add a leading dot
665
+
666
+ ℹ Unsafe fix
667
+ 59 59 | PosixPath ().with_suffix (" py" )
668
+ 60 60 | PurePath ().with_suffix (" py" )
669
+ 61 61 | PurePosixPath ().with_suffix (" py" )
670
+ 62 | - PureWindowsPath ().with_suffix (" py" )
671
+ 62 | + PureWindowsPath ().with_suffix (" .py" )
672
+ 63 63 | WindowsPath ().with_suffix (" py" )
673
+ 64 64 |
674
+ 65 65 | ### No errors
675
+
676
+ PTH210 .py :63 :1 : PTH210 [* ] Dotless suffix passed to ` .with_suffix()`
677
+ |
678
+ 61 | PurePosixPath ().with_suffix (" py" )
679
+ 62 | PureWindowsPath ().with_suffix (" py" )
680
+ 63 | WindowsPath ().with_suffix (" py" )
681
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PTH210
682
+ 64 |
683
+ 65 | ### No errors
684
+ |
685
+ = help : Add a leading dot
686
+
687
+ ℹ Unsafe fix
688
+ 60 60 | PurePath ().with_suffix (" py" )
689
+ 61 61 | PurePosixPath ().with_suffix (" py" )
690
+ 62 62 | PureWindowsPath ().with_suffix (" py" )
691
+ 63 | - WindowsPath ().with_suffix (" py" )
692
+ 63 | + WindowsPath ().with_suffix (" .py" )
693
+ 64 64 |
694
+ 65 65 | ### No errors
695
+ 66 66 | path .with_suffix ()
0 commit comments