Skip to content

Commit e6a92df

Browse files
committed
armagh fix
1 parent cc515aa commit e6a92df

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

openml/_config.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
import warnings
1313
from collections.abc import Iterator
1414
from contextlib import contextmanager
15-
from dataclasses import dataclass, field, replace
15+
from dataclasses import dataclass, field, fields, replace
1616
from io import StringIO
1717
from pathlib import Path
18-
from typing import Any, Literal, cast
18+
from typing import Any, ClassVar, Literal, cast
1919
from urllib.parse import urlparse
2020

2121
logger = logging.getLogger(__name__)
@@ -102,15 +102,7 @@ def __getattr__(self, name: str) -> Any:
102102
return getattr(self._config, name)
103103
raise AttributeError(f"{type(self).__name__!r} object has no attribute {name!r}")
104104

105-
_FIELDS = { # noqa: RUF012
106-
"apikey",
107-
"server",
108-
"cachedir",
109-
"avoid_duplicate_runs",
110-
"retry_policy",
111-
"connection_n_retries",
112-
"show_progress",
113-
}
105+
_FIELDS: ClassVar[set[str]] = {f.name for f in fields(OpenMLConfig)}
114106

115107
def __setattr__(self, name: str, value: Any) -> None:
116108
# during __init__ before _config exists

0 commit comments

Comments
 (0)