Skip to content

Commit

Permalink
fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereiracgn committed Dec 13, 2024
1 parent 9428ecb commit 7401368
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions cognite/client/_api/simulators/simulation_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def list(
Args:
limit (int): The maximum number of simulation runs to return.
filter (SimulationRunsFilter | dict[str, Any] | None): Filter to apply.
sort (CreatedTimeSort | SimulationTimeSort | None): Sort simulation runs by created time or simulation time.
Returns:
SimulationRunsList: List of simulation runs
Expand Down
2 changes: 2 additions & 0 deletions cognite/client/_api/simulators/simulator_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def list(
Args:
limit (int): Maximum number of results to return. Defaults to 1000. Set to -1, float(“inf”) or None to return all items.
sort (CreatedTimeSort | None): Sort order for the results.
filter (SimulatorModelRevisionsFilter | dict[str, Any] | None): Filter to apply.
Returns:
Expand Down Expand Up @@ -159,6 +160,7 @@ def list(
Args:
limit (int): Maximum number of results to return. Defaults to 1000. Set to -1, float(“inf”) or None to return all items.
filter (SimulatorModelsFilter | dict[str, Any] | None): Filter to apply.
sort (CreatedTimeSort | None): The criteria to sort by.
Returns:
SimulatorModelList: List of simulator models
Expand Down
7 changes: 5 additions & 2 deletions cognite/client/_api/simulators/simulator_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ def list(
limit: int = 20, # the maximum number of revisions to return is limited to 20 items.
sort: CreatedTimeSort | None = None,
filter: SimulatorRoutineRevisionsFilter | dict[str, Any] | None = None,
includeAllFields: bool = False,
include_all_fields: bool = False,
) -> SimulatorRoutineRevisionsList:
"""`Filter simulator routine revisions <https://developer.cognite.com/api#tag/Simulator-Routines/operation/filter_simulator_routine_revisions_simulators_routines_revisions_list_post>`_
Retrieves a list of simulator routine revisions that match the given criteria.
Args:
limit (int): Maximum number of results to return. Defaults to 10. Set to -1, float(“inf”) or None to return all items.
sort (CreatedTimeSort | None): The criteria to sort by.
filter (SimulatorRoutineRevisionsFilter | dict[str, Any] | None): Filter to apply.
include_all_fields (bool): If all fields should be included in the response. Defaults to false which does not include script, configuration.inputs and configuration.outputs in the response.
Returns:
SimulatorRoutineRevisionsList: List of simulator routine revisions
Expand All @@ -69,7 +71,7 @@ def list(
if isinstance(filter, dict)
else None,
sort=[CreatedTimeSort.load(sort).dump()] if sort else None,
other_params={"includeAllFields": includeAllFields},
other_params={"includeAllFields": include_all_fields},
)

def retrieve(self, id: int | None = None, external_id: str | None = None) -> SimulatorRoutineRevision | None:
Expand Down Expand Up @@ -162,6 +164,7 @@ def list(
Args:
limit (int): Maximum number of results to return. Defaults to 1000. Set to -1, float(“inf”) or None to return all items.
filter (SimulatorRoutinesFilter | dict[str, Any] | None): The filter to narrow down simulator routines.
sort (CreatedTimeSort | None): The criteria to sort by.
Returns:
SimulatorRoutineList: List of simulator routines
Expand Down

0 comments on commit 7401368

Please sign in to comment.