Skip to content

Commit 2f4fd87

Browse files
authored
Apply suggestions from code review
1 parent 883573f commit 2f4fd87

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyiceberg/catalog/rest/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class IdentifierKind(Enum):
237237
SIGV4_REGION = "rest.signing-region"
238238
SIGV4_SERVICE = "rest.signing-name"
239239
SIGV4_MAX_RETRIES = "rest.sigv4.max-retries"
240-
SIGV4_DEFAULT_MAX_RETRIES = 10
240+
SIGV4_MAX_RETRIES_DEFAULT = 10
241241
EMPTY_BODY_SHA256: str = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
242242
OAUTH2_SERVER_URI = "oauth2-server-uri"
243243
SNAPSHOT_LOADING_MODE = "snapshot-loading-mode"
@@ -699,7 +699,7 @@ def _init_sigv4(self, session: Session) -> None:
699699
class SigV4Adapter(HTTPAdapter):
700700
def __init__(self, **properties: str):
701701
self._properties = properties
702-
max_retries = property_as_int(self._properties, SIGV4_MAX_RETRIES, SIGV4_DEFAULT_MAX_RETRIES)
702+
max_retries = property_as_int(self._properties, SIGV4_MAX_RETRIES, SIGV4_MAX_RETRIES_DEFAULT)
703703
super().__init__(max_retries=max_retries)
704704
self._boto_session = boto3.Session(
705705
profile_name=get_first_property_value(self._properties, AWS_PROFILE_NAME),

tests/catalog/test_rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
DEFAULT_ENDPOINTS,
3434
EMPTY_BODY_SHA256,
3535
OAUTH2_SERVER_URI,
36-
SIGV4_DEFAULT_MAX_RETRIES,
36+
SIGV4_MAX_RETRIES_DEFAULT,
3737
SIGV4_MAX_RETRIES,
3838
SNAPSHOT_LOADING_MODE,
3939
Capability,
@@ -546,7 +546,7 @@ def test_sigv4_adapter_default_retry_config(rest_mock: Mocker) -> None:
546546

547547
adapter = catalog._session.adapters[catalog.uri]
548548
assert isinstance(adapter, HTTPAdapter)
549-
assert adapter.max_retries.total == SIGV4_DEFAULT_MAX_RETRIES
549+
assert adapter.max_retries.total == SIGV4_MAX_RETRIES_DEFAULT
550550

551551

552552
def test_sigv4_adapter_override_retry_config(rest_mock: Mocker) -> None:

0 commit comments

Comments
 (0)