Skip to content

Commit

Permalink
python: Simplify path param url formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-mman committed Jan 21, 2025
1 parent 67155e6 commit be34bba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/svix/api/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ def _get_httpx_kwargs(
header_params: t.Optional[t.Dict[str, str]],
json_body: t.Optional[t.Dict[str, t.Any]],
) -> t.Dict[str, t.Any]:
if path_params is None:
url = f"{self._client.base_url}{path}"
else:
formatted_path = path.format(**path_params)
url = url = f"{self._client.base_url}{formatted_path}"
if path_params is not None:
path = path.format(**path_params)
url = f"{self._client.base_url}{path}"

headers: t.Dict[str, str] = {
**self._client.get_headers(),
Expand Down

0 comments on commit be34bba

Please sign in to comment.