@@ -648,10 +648,13 @@ def visit_Call(self, node: cst.Call) -> None:
648648 )
649649
650650 # client.query.sql_select/sql_join/sql_joins — removed with no mechanical replacement
651- if method in _REMOVED_QUERY_METHODS and len (chain ) >= 3 and chain [1 ] == "query" and chain [2 ] == self ._client_var :
652- self .findings .append (
653- f"{ self ._client_var } .query.{ method } () — removed at GA with no mechanical replacement"
654- )
651+ if (
652+ method in _REMOVED_QUERY_METHODS
653+ and len (chain ) >= 3
654+ and chain [1 ] == "query"
655+ and chain [2 ] == self ._client_var
656+ ):
657+ self .findings .append (f"{ self ._client_var } .query.{ method } () — removed at GA with no mechanical replacement" )
655658
656659
657660def find_manual_patterns (source : str , * , client_var : str = "client" ) -> List [str ]:
@@ -680,9 +683,7 @@ def migrate_source(source: str, *, client_var: str = "client") -> str:
680683 return new_tree .code
681684
682685
683- def migrate_file (
684- path : Path , * , dry_run : bool = False , client_var : str = "client"
685- ) -> Tuple [bool , List [str ]]:
686+ def migrate_file (path : Path , * , dry_run : bool = False , client_var : str = "client" ) -> Tuple [bool , List [str ]]:
686687 """Migrate *path* in place. Returns (was_changed, manual_review_notes)."""
687688 original = path .read_text (encoding = "utf-8" )
688689 try :
@@ -730,7 +731,7 @@ def main(argv: Optional[List[str]] = None) -> int:
730731 if a == "--dry-run" :
731732 continue
732733 if a .startswith ("--client-var=" ):
733- client_var = a [len ("--client-var=" ):]
734+ client_var = a [len ("--client-var=" ) :]
734735 else :
735736 remaining .append (a )
736737
0 commit comments