Skip to content

Commit 87211a1

Browse files
author
Max Wang
committed
black formatting
1 parent d569ef4 commit 87211a1

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/PowerPlatform/Dataverse/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ def flush_cache(self, kind) -> int:
697697
"""
698698
with self._scoped_odata() as od:
699699
return od._flush_cache(kind)
700+
700701
# Other utilities
701702
@contextmanager
702703
def correlation_scope(self, correlation_id: str) -> Iterator["DataverseClient"]:

src/PowerPlatform/Dataverse/data/_odata.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838

3939
_USER_AGENT = f"DataverseSvcPythonClient:{_SDK_VERSION}"
4040
_GUID_RE = re.compile(r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}")
41-
_CALL_SCOPE_CORRELATION_ID: ContextVar[Optional[str]] = ContextVar(
42-
"_CALL_SCOPE_CORRELATION_ID", default=None
43-
)
41+
_CALL_SCOPE_CORRELATION_ID: ContextVar[Optional[str]] = ContextVar("_CALL_SCOPE_CORRELATION_ID", default=None)
4442

4543

4644
class _ODataClient(_ODataFileUpload):
@@ -188,11 +186,7 @@ def _request(self, method: str, url: str, *, expected: tuple[int, ...] = (200, 2
188186
pass
189187
sc = r.status_code
190188
subcode = _http_subcode(sc)
191-
request_id = (
192-
headers.get("x-ms-service-request-id")
193-
or headers.get("req_id")
194-
or headers.get("x-ms-request-id")
195-
)
189+
request_id = headers.get("x-ms-service-request-id") or headers.get("req_id") or headers.get("x-ms-request-id")
196190
traceparent = headers.get("traceparent")
197191
ra = headers.get("Retry-After")
198192
retry_after = None

0 commit comments

Comments
 (0)