File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212import warnings
1313from collections .abc import Iterator
1414from contextlib import contextmanager
15- from dataclasses import dataclass , field , replace
15+ from dataclasses import dataclass , field , fields , replace
1616from io import StringIO
1717from pathlib import Path
18- from typing import Any , Literal , cast
18+ from typing import Any , ClassVar , Literal , cast
1919from urllib .parse import urlparse
2020
2121logger = 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
You can’t perform that action at this time.
0 commit comments