Skip to content

Commit 7d899a9

Browse files
committed
make SERVERS_REGISTRY private
1 parent e5461a9 commit 7d899a9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

openml/_config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
openml_logger = logging.getLogger("openml")
2828

2929

30-
SERVERS_REGISTRY: dict[str, dict[APIVersion, dict[str, str | None]]] = {
30+
_SERVERS_REGISTRY: dict[str, dict[APIVersion, dict[str, str | None]]] = {
3131
"production": {
3232
APIVersion.V1: {
3333
"server": "https://www.openml.org/api/v1/xml/",
@@ -97,7 +97,7 @@ class OpenMLConfig:
9797
"""Dataclass storing the OpenML configuration."""
9898

9999
servers: dict[APIVersion, dict[str, str | None]] = field(
100-
default_factory=lambda: deepcopy(SERVERS_REGISTRY["production"])
100+
default_factory=lambda: deepcopy(_SERVERS_REGISTRY["production"])
101101
)
102102
api_version: APIVersion = APIVersion.V1
103103
fallback_api_version: APIVersion | None = None
@@ -252,11 +252,11 @@ def get_server_base_url(self) -> str:
252252
return domain.replace("api", "www")
253253

254254
def get_servers(self, mode: str) -> dict[APIVersion, dict[str, str | None]]:
255-
if mode not in SERVERS_REGISTRY:
255+
if mode not in _SERVERS_REGISTRY:
256256
raise ValueError(
257-
f'invalid mode="{mode}" allowed modes: {", ".join(list(SERVERS_REGISTRY.keys()))}'
257+
f'invalid mode="{mode}" allowed modes: {", ".join(list(_SERVERS_REGISTRY.keys()))}'
258258
)
259-
return deepcopy(SERVERS_REGISTRY[mode])
259+
return deepcopy(_SERVERS_REGISTRY[mode])
260260

261261
def set_servers(self, mode: str) -> None:
262262
servers = self.get_servers(mode)

0 commit comments

Comments
 (0)