Skip to content

Commit

Permalink
Black formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwiker committed Nov 14, 2024
1 parent 9721c53 commit 6b400bc
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/sumo/wrapper/sumo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,13 @@ def get(self, path: str, params: dict = None) -> dict:
headers.update(self.auth.get_authorization())

follow_redirects = False
if re.match(r"^/objects\('[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}'\)/blob$",
path) is not None:
if (
re.match(
r"^/objects\('[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}'\)/blob$",
path,
)
is not None
):
follow_redirects = True

def _get():
Expand Down Expand Up @@ -431,16 +436,21 @@ async def get_async(self, path: str, params: dict = None):
headers.update(self.auth.get_authorization())

follow_redirects = False
if re.match(r"^/objects\('[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}'\)/blob$",
path) is not None:
if (
re.match(
r"^/objects\('[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}'\)/blob$",
path,
)
is not None
):
follow_redirects = True

async def _get():
return await self._async_client.get(
f"{self.base_url}{path}",
params=params,
headers=headers,
follow_redirects = follow_redirects,
follow_redirects=follow_redirects,
timeout=self._timeout,
)

Expand Down

0 comments on commit 6b400bc

Please sign in to comment.