Skip to content

Commit ec9a502

Browse files
refactor(adms): tidy __all__ ordering and drop defensive getattr
- Sort the exceptions group of __all__ alphabetically (AdmsError / AdmsOperationError now precede AuthError) for consistency with the surrounding groups. - Replace getattr(config, "resource", None) with config.resource — AdmsConfig is a dataclass with a typed `resource: str | None = None` field, so the attribute is always present.
1 parent 8c13585 commit ec9a502

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/sap_cloud_sdk/adms/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@
9393
# config
9494
"AdmsConfig",
9595
# exceptions
96+
"AdmsError",
97+
"AdmsOperationError",
9698
"AuthError",
9799
"ClientCreationError",
98100
"ConfigError",
99-
"AdmsError",
100-
"AdmsOperationError",
101101
"DocumentNotFoundError",
102102
"HttpError",
103103
"ScanNotCleanError",

src/sap_cloud_sdk/adms/_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
client_secret=config.client_secret,
6060
session=session,
6161
cache=cache,
62-
resource=getattr(config, "resource", None),
62+
resource=config.resource,
6363
)
6464

6565
def get_token(self) -> str:

0 commit comments

Comments
 (0)