@@ -25,18 +25,13 @@ def check(self, source: str, filename: str) -> list[Diagnostic]:
2525 # ------------------------------------------------------------------
2626 # pandas-chained-indexing
2727 # ------------------------------------------------------------------
28- def _check_chained_indexing (
29- self , tree : ast .Module , filename : str
30- ) -> list [Diagnostic ]:
28+ def _check_chained_indexing (self , tree : ast .Module , filename : str ) -> list [Diagnostic ]:
3129 results : list [Diagnostic ] = []
3230 for node in ast .walk (tree ):
3331 if not isinstance (node , ast .Assign ):
3432 continue
3533 for target in node .targets :
36- if (
37- isinstance (target , ast .Subscript )
38- and isinstance (target .value , ast .Subscript )
39- ):
34+ if isinstance (target , ast .Subscript ) and isinstance (target .value , ast .Subscript ):
4035 results .append (
4136 Diagnostic (
4237 file_path = filename ,
@@ -55,9 +50,7 @@ def _check_chained_indexing(
5550 # ------------------------------------------------------------------
5651 # pandas-inplace-assignment
5752 # ------------------------------------------------------------------
58- def _check_inplace_assignment (
59- self , tree : ast .Module , filename : str
60- ) -> list [Diagnostic ]:
53+ def _check_inplace_assignment (self , tree : ast .Module , filename : str ) -> list [Diagnostic ]:
6154 results : list [Diagnostic ] = []
6255 for node in ast .walk (tree ):
6356 if not isinstance (node , ast .Assign ):
@@ -90,9 +83,7 @@ def _check_inplace_assignment(
9083 # ------------------------------------------------------------------
9184 # pandas-nan-comparison
9285 # ------------------------------------------------------------------
93- def _check_nan_comparison (
94- self , tree : ast .Module , filename : str
95- ) -> list [Diagnostic ]:
86+ def _check_nan_comparison (self , tree : ast .Module , filename : str ) -> list [Diagnostic ]:
9687 results : list [Diagnostic ] = []
9788 for node in ast .walk (tree ):
9889 if not isinstance (node , ast .Compare ):
0 commit comments