Skip to content

Commit 69dde64

Browse files
vdusekclaude
andauthored
chore: Remove dead duplicate urlparse in async create_keys_public_url (#750)
## Summary The async `KeyValueStoreClientAsync.create_keys_public_url` assigned `keys_public_url = urlparse(self._build_url('keys'))` early in the method, but this value was unconditionally overwritten later by `urlparse(self._build_url('keys', public=True))`. The sync counterpart only has the single correct call — this was an asymmetric refactor artifact. No behavior change: the second assignment always won. Removing the dead call eliminates a small wasted `_build_url`/`urlparse` on every call and removes a latent foot-gun where code inserted between the two assignments would silently see the non-public URL. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fdc553e commit 69dde64

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/apify_client/_resource_clients/key_value_store.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,8 +906,6 @@ async def create_keys_public_url(
906906
"""
907907
metadata = await self.get(timeout=timeout)
908908

909-
keys_public_url = urlparse(self._build_url('keys'))
910-
911909
request_params = self._build_params(
912910
limit=limit,
913911
exclusiveStartKey=exclusive_start_key,
@@ -924,6 +922,7 @@ async def create_keys_public_url(
924922
request_params['signature'] = signature
925923

926924
keys_public_url = urlparse(self._build_url('keys', public=True))
925+
927926
filtered_params = {k: v for k, v in request_params.items() if v is not None}
928927
if filtered_params:
929928
keys_public_url = keys_public_url._replace(query=urlencode(filtered_params))

0 commit comments

Comments
 (0)