Skip to content

Commit ce2710d

Browse files
author
Samson Gebre
committed
Fix black format
1 parent d6c1b82 commit ce2710d

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/PowerPlatform/Dataverse/models/fetchxml_query.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ def execute_pages(self) -> Iterator[QueryResult]:
155155
continue
156156
except (_ET.ParseError, ValueError) as exc:
157157
warnings.warn(
158-
f"FetchXML paging cookie could not be parsed ({exc}); "
159-
"falling back to simple paging.",
158+
f"FetchXML paging cookie could not be parsed ({exc}); " "falling back to simple paging.",
160159
UserWarning,
161160
stacklevel=2,
162161
)

tools/migrate_v0_to_v1.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

657660
def 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

Comments
 (0)