Skip to content

Commit 88077a7

Browse files
committed
chore: fixed the args limit in function using noqa
Signed-off-by: rohansen856 <rohansen856@gmail.com>
1 parent 9100d91 commit 88077a7

2 files changed

Lines changed: 27 additions & 10 deletions

File tree

openml/_api/resources/base.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,12 @@ def get(
3333

3434
class StudiesAPI(ResourceAPI, ABC):
3535
@abstractmethod
36-
def list(self, **kwargs: Any) -> Any: ...
36+
def list( # noqa: PLR0913
37+
self,
38+
limit: int | None = None,
39+
offset: int | None = None,
40+
status: str | None = None,
41+
main_entity_type: str | None = None,
42+
uploader: list[int] | None = None,
43+
benchmark_suite: int | None = None,
44+
) -> Any: ...

openml/_api/resources/studies.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66

77

88
class StudiesV1(StudiesAPI):
9-
def list(self, **kwargs: Any) -> Any:
10-
limit = kwargs.get("limit")
11-
offset = kwargs.get("offset")
12-
status = kwargs.get("status")
13-
main_entity_type = kwargs.get("main_entity_type")
14-
uploader = kwargs.get("uploader")
15-
benchmark_suite = kwargs.get("benchmark_suite")
16-
9+
def list( # noqa: PLR0913
10+
self,
11+
limit: int | None = None,
12+
offset: int | None = None,
13+
status: str | None = None,
14+
main_entity_type: str | None = None,
15+
uploader: list[int] | None = None,
16+
benchmark_suite: int | None = None,
17+
) -> Any:
1718
api_call = "study/list"
1819

1920
if limit is not None:
@@ -35,5 +36,13 @@ def list(self, **kwargs: Any) -> Any:
3536

3637

3738
class StudiesV2(StudiesAPI):
38-
def list(self, **kwargs: Any) -> Any:
39+
def list( # noqa: PLR0913
40+
self,
41+
limit: int | None = None,
42+
offset: int | None = None,
43+
status: str | None = None,
44+
main_entity_type: str | None = None,
45+
uploader: list[int] | None = None,
46+
benchmark_suite: int | None = None,
47+
) -> Any:
3948
raise NotImplementedError("V2 API implementation is not yet available")

0 commit comments

Comments
 (0)