Skip to content

Commit be34bba

Browse files
committed
python: Simplify path param url formatting
1 parent 67155e6 commit be34bba

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

python/svix/api/common.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,9 @@ def _get_httpx_kwargs(
7474
header_params: t.Optional[t.Dict[str, str]],
7575
json_body: t.Optional[t.Dict[str, t.Any]],
7676
) -> t.Dict[str, t.Any]:
77-
if path_params is None:
78-
url = f"{self._client.base_url}{path}"
79-
else:
80-
formatted_path = path.format(**path_params)
81-
url = url = f"{self._client.base_url}{formatted_path}"
77+
if path_params is not None:
78+
path = path.format(**path_params)
79+
url = f"{self._client.base_url}{path}"
8280

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

0 commit comments

Comments
 (0)